Setting Attachment field as Mandatory based on Custom select list value selection

Akbar N November 1, 2018

Hi, 

Based on a custom select filed value, we want to make the Attachment field set as mandatory. Ex selecting "Canada" as value for Country custom select field, i want the attachment field to be marked as required field. Only after uploading an attachment it needs to let the user submit the issue. 

Is this possible to achieved through Behaviors plugin which is already installed on our instance..  

We are on the Jira Server version and will not be allowed to add any plugins to achieve this functionality. Any suggestion to achieve would be highly helpful and thanks in advance. 

 

1 answer

0 votes
Deleted user November 1, 2018

Hi @Akbar N ,

 

Unfortunately, you cannot make "ATTACHMENT" field as mandatory using behaviors (you can do this for other fields though). Please see this : 

https://productsupport.adaptavist.com/browse/SRJIRA-52

 

 

Regards,

Swathi

Akbar N November 2, 2018

Hi Swathi, I saw that thread already and posted to see whether is there any updates after that. Yes i can able to achieve the mandatory validation for other fields though there are no issues. 

Is that a way to check any files attached to an issue or not and prompting user to attach one before issue creation?

Alvin
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.
January 23, 2019

Hi @Akbar N, have you resolve this using validators? and if yes, would you mind to share me your code so I can have  a good start ? Thanks!

Akbar N January 28, 2019

Hi @Alvin Apologies for the delay in my response. 

I was able to achieve it by using the JMWE plugin .  I have placed this validation during the create request transition as part of the Validators phase. 

This way it makes the Attachment as a mandatory field and throws a custom error if you have given one otherwise throws the defalut error message when no attachments is added. 

Let me know if you have any questions. 

Alvin
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.
January 28, 2019

Hi @Akbar N, I need this to work on JIRA Service Desk. 

Suggest an answer

Log in or Sign up to answer