How to add "Development" field parameters to the Validator

Parvaneh Zand
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.
March 6, 2020

Hello everyone,

I want to add a validatior to a transition, which checks  the statuses of "Development" parameters.

I don't know how to do that with Scripted (Groovy) Validator (JMWE add-on).

I attached a picture with an example (statuses of all Pull Requests should be merged, but for the tested issue, it returns wrong result)

How can I write the script?

 

Any help would be appreciated,

Thank you.

pr.jpg

3 answers

0 votes
Kiranped January 11, 2022

@Parvaneh Zand 

Did you find the solution?

0 votes
evzensx June 26, 2020

@Parvaneh Zand  you can try something like this for JMWE:

issue.get("Development").summaryBean.summary.pullrequest.overall.details.mergedCount != 0

 it return true if any merged request exist on issue provided.

Also ensure, that "Development" customfield exist and has exact name.

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2020

Did you try to test just

issue.get("Development").pullrequest

to see what the value looks like? The structure of the value of the Development field is actually fairly complex, and also partially dependent on the development info provider (app).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events