Is there any optional script that can be used to make
4 attachments mandatory at a specific transition in workflow of jira.
Use a simple scripted condition in a workflow post functions using scriptrunner and use the following code:
import com.atlassian.jira.component.ComponentAccessor
ComponentAccessor.attachmentManager.getAttachments(issue).size() >= 4
I am presuming this is what you want? this won't let you transition the issue unless there are 4 or more attachments attached to the current issue.
Sorry I don't understand your question? so you know there is 4 attachments at a specific transition in the workflow, what are you want to do now?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Starting off here you could do some further actions based on ScriptRunner (please see here for further documentation: https://scriptrunner.adaptavist.com/5.6.15/jira/recipes/workflow/validators/validate-attachments-links-in-transition.html).
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry ill elaborate,
when i make a transition, i have a pop up screen which requests for a attachment.
at that point i need to make a validator scritpt that if user doesnt attach 4 attachments.
the transition gives an error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand what you want to do now, I am not sure if the pop up part of this is possible. it is possible to check for attachments and then put an error against a field when this isn't met, but the part with a pop up I am not sure of, maybe somebody from Adaptavist will be able to advise further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Both, Greetings!
is there any way to make attachment based on condition and moves the transition.
like i have a custom field is "Total Amount"
If the total Amount is >= 10000 then attachment is mandatory to attach.
and IF the total amount is <10000 then attachment is not required.
Kindly advice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.