Hi Team,
will it be possible to configure the flow in such a way that the attachments field only mandatory if an attachment hasn't already been attached?
we need attachment should be mandatory when attachments hasn't been attached to an issue.
if it is possible and please provide the steps or script?
Thanks
Ravikanth
Our File Field Jira App should answer your use case.
(I'm the founder of Apwide, the company behind the app).
You can use the Data Center version of the App on your Jira Server - it worked well for our latest Jira Server customers.
Let me know if you need any assistance, you'll see that the setup is quite straightforward - you just create file fields like standard Jira custom fields.
Have a nice day,
David
Hello @Ravikanth Chinthakuntla ,
Tt is not possible out of the box in Jira, but you can use script runner and create scripted validator to achieve this. You can follow the below steps.
Select the Create transition.
Click Validators→Add Validator.
Select ScriptRunner Script and click Add.
Add a description of the validator in Name of ScriptRunner Script Validator, for example, Require Attachments.
Insert the following ScriptRunner Script Validator. Change length ==3
to specify the minimum number of required attachments:
issue.attachments.filter(attachment => attachment.id == null).length ==3
Fore more information you may please have a look at: https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/validators/example-validators
Regards.
Mayur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mayur Jadhav ,
I have tried with the provided script validator but it is not working as I expected, so the solution which I am expecting is we have an already attachment is mandatory when we move the status from "in progress" to "close" the attachment is showing mandatory, but I don't required attachment field during the closure of issue. if we have any script or solution kindly provide me.
Thanks
Ravikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ravikanth Chinthakuntla ,
I would suggest you have transition screen and apply above validator in particular transition only for example, Open to In Progress and it will be only mandatory for that transition only.
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.