can I create an approval with validator function? Edited

I tried but it doesnt work.

after config the approval function, when approver click the approve button, the status will change without doing validator checking.

2 answers

It would have been much easier to help you if you could give us some information.

Is this Apporve button a workflow transition?

Can you please show us your code?

Thanks!

Shaakunthala

Screen Shot 2017-08-01 at 1.10.20 PM.pngthe approval is set in the status,

the validator is set in the transition(IT approved).

However, the validator doesn't work. Jira ignores the validator.

This is new to me, as I haven't used ServiceDesk.

I tried to re-create your problem, and instead of a simple validator I used a script validator. 

Selection_137.png

After approving a test issue, validator status was still shown as "Has not run yet.", which means JIRA bypasses validators in case of approvals.

So, the answer to your question is No. A workaround may be possible - but there will be compromises.

Shaakunthala

Susan Hauth Community Champion Aug 01, 2017

Did you try using a condition instead of a validator?

tried. condition doesnt work too.

Although approvals and workflow transitions look visually similar to the end user, JIRA internally organizes approvals in a different way (meta data tags in workflow XML rather than action). I think this gives an indication that conditions and validators won't work here.

What you can do here is, forget approvals feature and create your own transitions called Approve/ Decline. If you have Script Runner add-on you can write a custom validator for 'x number of approvers' feature too.

Thanks.

Shaakunthala

But I want to let the approver receive email to notify him to approve. the approver is set by the customer using custom field.

How can i do that?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot