Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment validator not working as expected

jessica_huebner
Contributor
August 18, 2025

In my workflow, I have a condition that checks the value of a field. If the value is equal to a certain option, an attachment is required, else no attachment is required. The workflow is not working as expected. Here's the issue:

Condition/Validator

Condition: User Notification Required? = Yes - All Staff

Validator: Attachment "field" required

 

Expected Results

Attachment is attached. User can transition to the status without issue.

 

Actual Results

Error message still thrown, despite the attachment existing on the issue.

 

How can I alter my workflow to get this to give me the expected results? NOTE: I must rely on native Jira features. I have no interest in using 3rd party apps/add-ins like script runner. If this is not possible with native Jira functionality, that's ok, just need to know.

Thanks in advance for your help!Attachment error.pngAttachment.pngCondition.pngValidator.png

3 answers

1 accepted

0 votes
Answer accepted
Aaron Pavez _ServiceRocket_
Community Champion
August 18, 2025

Hi @jessica_huebner 

Can you add the attachment to that screen? The validator is looking for the attachment in that screen, not the one you've already have in the work item.

You can add the Attachment field to that screen.

Regards

jessica_huebner
Contributor
August 18, 2025

Hey @Aaron Pavez _ServiceRocket_ thank you, this did work.

Is this the only way this validator will work? My worry is my users may attach before they get to this screen. The end result I feel is confusing. Attachment already exists, yet it asks for it again. When I do this, the work item now has 2 of the same attachments.

This also seems to be a bit of a variance in system behavior - my other validators can be filled in beforehand without issue, The attachment on the other hand, seems like a user must submit during the transition (not before like they can with other fields). Do you know why this is?

Thanks so much for your help!

Aaron Pavez _ServiceRocket_
Community Champion
August 18, 2025

Hi Again!

This happens because the validator will validate during the transition screen. It won't check any existing attachment.

For this, an automation might help.  This post has an interesting idea:

https://community.atlassian.com/forums/Jira-questions/Validation-in-the-transition-to-check-ticket-has-an-attachment/qaq-p/2354636

Or you go the third-party app way. Either Scriptrunner or JMWE. JMWE its easier.

Regards

Like jessica_huebner likes this
1 vote
Nacho Moreno Ortega
Contributor
August 19, 2025

Hi @jessica_huebner ,

 

I am Nacho and i am part of Decadis.

 

If using a third-party app is an option for you, you can easily use our Jira expression validator from our app Jira Workflow Toolbox to check if the issue has an attachment (no matter if it was added during the transition screen or if the issue had one attachment beforehand).

 

The following Jira expression can be used in the validator to check if the current issue has an attachment, depending on if the corresponding custom field has the desired value:

issue?.customfield_XXXXX?.value == "Yes - All Staff" ? issue?.attachments.length > 0 : true

Please, replaxe "XXXXX" with the id of "User Notification Required" custom field.

The validator should look like the following screenshot:

Attachment_validator.png

 

If you have any question regarding how to apply this validator, please do not hesitate to contact us via our Support portal .

 

Best regards,

Nacho

0 votes
Maciej Dudziak _Forgappify_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2025

Hi @jessica_huebner

The out-of-the-box Field Required Validator works differently for a few fields, such as Attachments, Comments, and Time Spent. For these fields, the built-in validator enforces that an attachment or comment is added during the transition, ignoring any items that were previously added.

Third-party validators (from apps) behave differently: they always validate against all values, including those added earlier. This has its own consequences—if you want to enforce that a value is provided specifically during the transition, then you must validate values from both the issue and originalIssue.

I’m from Forgappify, and we provide an app that includes various validators, including our own Fields Required Validator, which checks whether an attachment has been added either before the transition or during it.

In summary, you have following options:

  • Use the classic validator if the attachment must be added specifically during the current transition.

  • Use a third-party validator if the attachment can be added at any point earlier in the workflow (not necessarily during the current transition).

I hope it will help,

Cheers

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events