Jira Script to popup edit window for the issue

ahmed itman October 8, 2019

We want to use Post-Function OR validator  Features for a specific condition "Required fields does did not entered" when changing the transition, it will popup the edit window for that issue, for entering the required fields

How can do this ?

2 answers

1 accepted

0 votes
Answer accepted
Andrew Laden
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.
October 8, 2019

Please see my comment in your other question.

https://community.atlassian.com/t5/Jira-questions/Custom-Required-field-does-not-trigger-when-is-empty/qaq-p/1197622

In short, you can have two transitions. Transition 1 has a condition that the field is not empty, and doesnt have a transition screen. Transution 2 has a condition that the field is empty, and does have a transition screen,

 

In general, please try to avoid asking the same question multiple times.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2019

Validators and post-functions do not have front-end elements - they run as part of a transition and execute without talking to people.

A post-function would be far too late in the transition too, they happen after you have checked everything, and do things like start writing the data back to the issue, so it's too late.

A validator checks something and has a simple result - pass or fail (with an optional error message).  If it passes, the transition continues, if it fails, it goes back to the transition screen. 

So, use a validator, but forget your own pop up edit, you don't need it.  Just ensure the fields the people should edit are on the transition screen, and the validator will take them back there.

ahmed itman October 8, 2019

Perfect @Nic Brough -Adaptavist- 
Which validator  type should i use ? 
should it "Fields Required (JSU)" ? 

ahmed itman October 8, 2019

@Nic Brough -Adaptavist- 

Perfect 
i am using "Fields Required (JSU)" in validator, Is it Right ? 

ahmed itman October 8, 2019

@Nic Brough -Adaptavist- 

I used Fields Required (JSU) and Custom Fields in the screen, but validator just popup a message. 

ahmed itman October 8, 2019
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2019

That looks like you don't have a transition screen.  If you did, it would go back to it when the validator fails.

ahmed itman October 8, 2019

i did a "transition screen" when click on X transition it will appears.
but that screen appears in all cases " pass or fail "

@Nic Brough -Adaptavist- 
is their a missing ?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2019

Hmm.  What's that plzzzzz bit?

JSU should be fine for this, but the validators in the workflows I've got throw me back to the transition screen fine, so I'm a little confused.

Like ahmed itman likes this
Andrew Laden
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.
October 8, 2019

He only wants the transition screen to appear if the field is empty. If the field has a value set, he wants the transition to execute without a screen.

See my note below. You will have to create two transitions, and use conditions to control which one is used.

Like ahmed itman likes this
ahmed itman October 9, 2019

@Andrew Laden  

I took your note, it is perfect. It made me to create TWO transition with different names ( with conditions ), The solution is perfect, but it think it is overload, 
Thanks @Andrew Laden and @Nic Brough -Adaptavist-
If their is another solution please share with me 

Suggest an answer

Log in or Sign up to answer