Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set fields to required based on a checkbox value on the close issue transition?

Deleted user December 7, 2018

Hello,

my problem looks like this:

We got a customcheckbox "complaint" with values (yes / no).
When an agent wants to close an issue, then the following 2 options would be...

if compliant = no -> the issue can be closed and nothing happens

if compliant = yes -> an new screen "Classify the compliant" should open with 5 required fields (drop downs and numerics), which will then be filled by an agent and after the values were saved the issue can be closed finally

Thanks in advance.

2 answers

1 accepted

0 votes
Answer accepted
Tarun Sapra
Community Champion
December 7, 2018

Hello @[deleted]

Since you have Script Runner plugin installed, a similar question has already been answered here

https://community.atlassian.com/t5/Jira-questions/Show-transition-screen-conditionally-based-on-field-value-in/qaq-p/686294

Tarun Sapra
Community Champion
December 7, 2018

If you don't want to use parallel transitions, you can use the following way of implementing it

https://community.atlassian.com/t5/Jira-questions/Script-Runner-Condition-to-Show-Specific-Screen/qaq-p/14060

0 votes
Alexey Matveev
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.
December 7, 2018

Hello,

You would need an add-on for it.

For example, you could use the Power Scripts add-on.

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could use the Live Fields feature:

https://confluence.cprime.io/display/JJUPIN/Live+Fields

You could create a screen with an addition tab with the required field. Then you could wirte a script like this:

if(argv["customfield_10100"] == "Yes") {

lfShowTab("Fields Tab");

if (isNull(argv["customfield_10101"]) || isNull(argv["customfield_10102"]) || isNull(argv["customfield_10103"]) || isNull(argv["customfield_10104"]) || isNull(argv["customfield_10105"])) {

lfDisable("editSubmit");

} else {

lfEnable("editSubmit");

}

} else {

lfHideTab("Fields Tab");

}

customfield_10100 is the radio button field

customfield_10101 - customfield_10105 are the required fields

Deleted user December 7, 2018

Thanks, we already run Script Runner on this instance, could we also do it with this addon? I'm not really into coding but I thought about the option to add a script runner behaviour for this problem. My problem here would be, that the script only needs to be triggered if the value of "complaint" = yes otherwise the script shouldn't run and the ticket will be closed like usual.

Alexey Matveev
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.
December 7, 2018

You definitely can do it with the ScriptRunner. But I do not have a ready script :(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events