Forums

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

Check if issue contains attachments when transition

Suzanne Cranfield May 17, 2023

I am setting up Issue Checklist Pro with my projects and while setting up the checklists I also want to automatically check if attachments have been saved in an issue when transitioning from one status to another? 

I want the transition to fail if attachments are not present in the ticket and the user to get a message so that they attach files. 

If that is possible I would also then like to check the filenames - I am expecting files to be attached that follow a certain naming convention so want to be able to search for certain text within the file name. I am thing some sort of look up table might work for this. 

I just dont know where to start. 
Had tried validation on the workflow but that did not work. 

Not sure if there is a way using automation. 

Bear in mind I am not a software developer... 

Thanks

Suzanne

 

 

3 answers

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.
February 18, 2025

Hi @Suzanne Cranfield 

 

Jira's built-in Field Required Validator makes sure fields aren’t empty during a transition, including the Create issue transition. But here’s the catch: it only works when there’s a transition screen.

If you add the attachment in the Issue View and then try to transition the issue, Jira’s validator won’t recognize it. It expects the attachment to be added during the transition. If there’s no transition screen with the Attachment field, the validator blocks the transition.

You have two choices:

  1. Add a transition screen with the necessary fields.

  2. Use 3rd party validators, which are based on Jira-Expressions

I’m from Forgappify and we’ve been working on a more flexible way to build conditions using Jira Expressions. This led to the Ultimate Validator (now in Beta), which is part of the Workflow Building Blocks for Jira app. It lets you use most of the power of Jira Expressions—but without writing code. Instead, you build conditions through a simple UI Here’s an example how you can check file names of the attachments:Attachments_must_be_one_of_3_names.png

I hope it will help,

Cheers

0 votes
Boluwatife Adewole February 13, 2025

hi @Suzanne Cranfield ,

 

Adding a screen to the transition and updating the status from inside the issue would bring up the screen.

If you attach something to the screen pop-up, the transition works. 

You have to add it from the transition screen though, if you attach it before transitioning to the new status, it won't work.

Suzanne Cranfield February 18, 2025

Hi. That is the issue the attachments will have most likely already  been attached. 
The requirement has become a minor priority so I will come back to it another time. Thank  you for your input though. 

0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

Hi @Suzanne Cranfield , thanks for your question.

You should be able to use a validator to prevent the transition if there is no attachment.

The validator I would use is this one -

image.png

It doesn't explicitly say you are checking for attachments but you will note in the field attachment is available in the options -

image.png

Here, you can also specify a message for when someone tries to execute this transition without an attachment.

image.png

You could also create a specific screen for this transition so that you generate a pop-up which shows more clearly what you need to do in order to complete the transition, but this solution should also work as you anyway get the feedback that the attachment is missing.

For the screen solution, you can just create a screen with the fields on it you want people to fill in before allowing them to do the transition and then here, click on Edit

image.png

and choose the screen you just made -

image.png

When I go back to the issue and try the transition, and then in the screen, I don't attach something, you can see it is more clear what I need to do to pass this -

image.png

Anyway, I hope this helps you. If you have any follow up questions, please write here and either I or someone else will try to assist.

Cheers

Suzanne Cranfield May 24, 2023

Hi Valerie, 

I had actually already tried the set ups that you suggested here. 

They work to an extent...

If there are no attachments in the issue then the validation works. 
If however, if there is an attachment already added prior to the transition then it fails. 
It asks me to attach something and then I cannot go further. 
Technically the validation should see that an attachment exists so it should not ask me to add anything. 

Any ideas? 
Thanks 
Suzanne

Vincenzo Campanale
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2023

@Suzanne Cranfield have you found a solution to your question? Thanks, Vincenzo

Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2023

Hi @Suzanne Cranfield , thanks for your feedback. This, as far as what I have implemented, is what is possible to achieve with the Jira functionality out-of-the-box. With apps for scripting or to extend the functionality of the workflows, you can do more but this also comes with a cost. If you like, I can recommend some apps I have used before with sucess and you can test them out and see if they help you get to where you want to be. Let me know.

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