I am trying to prevent a work item from transitioning to a waiting for approval status unless a 8 or more attachments are attached, I am also trying to apply this rule to 2 status transitions. I have a team that requires a number of forms completed before they can start working on a task.
I have tried using the workflow rule 'Restrict to when a field is a specific value.'
For this field Attachment
Review its value as A number and Check if it Is less than
This value 8
Even though I meet the requirement I have set, of 8 or more attachments the transition to 'waiting for approval' does not become available. I have tried attaching the attachments prior to ticket submission and after ticket submission and I run into the issue in both scenarios. I do also have a Jira form attached, so I'm unsure if that would affect anything.
Hello @Malee Copeland
Welcome to the Atlassian community.
The Attachment field itself cannot be set to a number. The Attachment field is a structure representing all the attachments on the issue. I don't believe you can compare that field as a Number to a number to enforce a requirement about the number of attachments on the issue.
You could consider setting up an Automation Rule that checks the number of attachments and updates an "attachment count" custom number field that you create. You could then reference that custom number field in your transition condition.
Thank you for your reply!
Unfortunately I am unable to use a custom field in the automation. The custom field was created with the field type as Number of attachments. I am open to any other suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are some discrepancies in the information you provided.
In your automation rule I see this:
That indicates that the field you are trying to edit is named "customfield_attachment_count".
However in your next image you are showing the details for a field named "Attachment Count"
These are not the same field.
Regardless, the custom field to use in this scenario needs to be created as type "Number", not "Number of attachments".
And then make sure that is the field you elect to edit in your automation rule.
You should be able to use a "Number" custom field in the automation. And the value you would set it to would be:
{{issue.attachment.size}}
You should do testing though for all the scenarios through which an attachment could be added or removed to confirm that the Issue Updated trigger is activated by all of them. You may need to instead look at using the Field Value Changed trigger monitoring the "Attachment" field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Malee
I’m Thiago, a support engineer at Appfire and I’m here to help you.
If you are considering using third-party apps, the Jira Misc Workflow Extensions (JMWE) would be the perfect fit for your needs.
You can use the “Build-your-own Condition” rule in your workflow and specify the attachment count you wish to restrict to, as shown below:
Remember to set the conditions accordingly to your needs.
Please contact our support if you have any other questions about this.
Best regards, Appfire support team.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.