custom fields validation

srinivasp
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 8, 2012

Some custom fields are configured and they are in production now. So while creating an issue, if a user enters a value in one custom field, i want to prompt him to fill another custom field on click of create button if he doesn't enter any value to the second custom field. What are the possible ways to handle this requirement and which is the easiest way?

1 answer

1 accepted

1 vote
Answer accepted
Mizan
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 8, 2012

Hi Srinivas ,

There might be many better ways to do this , but according to me the easiest way would be to create a groovy script validator(requires script runner plugin) which checks the 2 customfield if there is a value in first customfield and not in the second, then an error message which will prompt to fill the second customfield. And add this validator on the create step/transition.

srinivasp
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 8, 2012

Hi Mizan,

Sounds like apt solution for my requirement. Appreciate if you could share some links or steps related to this requirement as i have no idea about groovy script validator configurations.

Thanks..

Mizan
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 8, 2012

these are few links you will find useful

about script runner plugin in the below link

https://studio.plugins.atlassian.com/wiki/display/GRV/Script+Runner

there is a similar script in the below link

https://studio.plugins.atlassian.com/wiki/display/GRV/Validators

srinivasp
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 8, 2012

Hi Mizan,

Thanks for sharing the information.

Will try to work out this and post an update on the status.

Thanks..

Suggest an answer

Log in or Sign up to answer