Validation on Edit Issue

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.
September 26, 2013

I have a validation script running on Issue Create operation and it is found executing while creating issues. If i edit the issue, the validation is not firing. What should i do in this case?

5 answers

1 vote
Bharadwaj Jannu
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.
September 26, 2013

you can go through Jira Scripting Suite(JSS) plugin in which you can add workflow and edit validators and postfunctions.

https://marketplace.atlassian.com/plugins/com.quisapps.jira.jss

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.
September 27, 2013

Hi Bharadwaj,

I have seen the comments as really helpful but there is no proper documentation available for this plugin. Could you please suggest any samples to know more about this?

Bharadwaj Jannu
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.
September 29, 2013

Hello srinivas,

even I donot find any proper documentation for JSS.

Alternatively you can implement your requirement by extending Edit Action and Quick Edit Action.

The following link help how to extend those actions.

https://answers.atlassian.com/questions/83433/validator-support-for-edit-quick-edit-and-soap

1 vote
RambanamP
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.
September 26, 2013

another way is, remove the fields which need to validate on edit screen and create workflow transitions something like "Update Data" and field to that screen so in this way you can validate fields

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.
September 27, 2013

Hi Prasad,

Its a good suggestion and I really appreciate your advise. I am facing issues with validation. Actually the validation is very simple and I am using simple script validation which is really killing me. Could you please help me on that?

RambanamP
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.
September 27, 2013

i am not sure how to configure validator for edit screen,

if you create a Intermeadiate workflow transition then you can configure validator.

ask user to use this transition to update data instead of using edit

1 vote
Ramiro Pointis
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.
September 26, 2013

That's a tricky question indeed... The validation script it's fired like a part of the workflow.. editing your issue isn't part of the workflow so it can't be fired...

What you can do it's run the validation when a transition it's made so it checks the changes the issue had. Or don't give permissions to edit issue an just use the edit issue screen as a transition screen.

0 votes
Renjith Pillai
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.
September 27, 2013

Srinivas, I would really go with Rambanam's suggestion. Take out the permissions for all for Edit so that the Edit button itself disappears. Then add a transition (global) by the name Edit and make it as the first one (in the workflow order) and that will solve the problem completely. You will have complete control over conditions/validators and post functions.

Kim Poulsen
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.
September 29, 2013

But wouldn't that ruin the 'e' keyboard shortcut?

I guess you cant have botgh as it is now. Is Atlassian considering consolidating the handling of issue operations such as create, edit and workflow transactions into a more coherent user experience?

As a user it is quite hard the first time to figure out that for instance create and edit are not the same as any other workflow transition.

0 votes
MichałS
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.
September 26, 2013

hi, do you need to check if the all the required fields are filled (required) or if the fields contains correct format and values?

Suggest an answer

Log in or Sign up to answer