Hey Jira folks, I have a frustrating issue that's become quite the time-waster as of late. I would like to remove specific attachments from an issue when the status is changed. I have the trigger set properly, but the problem is that the attachments remain after I expect them to be deleted.
The attachment identification is done via regex, noted as follows:
So, if I wanted to remove forms called "Part 1", "Part 2", and "Part 3", I would simply put Part 1, Part 2, Part 3 into the regex field. Yet, the automation runs and detects nothing when said forms are attached to the issue. Anyone else run into this problem?
Hi @Ian Guyette
Is "Part 1" the full name? Or is it something like "Part 1.pdf"
You need the ".pdf" part also if yes.
So it would be...
Part 1.pdf,Part 2.pdf,Part 3.pdf
Ste
Thanks Stephen, I was wondering about this and I'll elaborate a little further.
The attachments do end up looking like that as PDFs on the issue. Further, they also have the date of the attachment added to them. This shouldn't be an issue, since regex can look for patterns to match, and I should be able to use a regex expression to search for "Part 5" within an attachment's name, but this has never yielded successful results.
For instance, using:
(?i)Part 5
Yields no results on an issue that has "Report (Part 5).pdf" as its name. The automation triggers when the issue closes, runs and reports a success for no actions performed, even though it really should be seeing this file and removing it. Very odd.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Turns out the regex has to match the filename exactly, so I needed to adjust the syntax. Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.