You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Does anyone got it work. Root Cause field required based on Resolution field value selection to "Fixed". In the transition form if user select "Fixed" for Resolution field then "Root Cause" field should set to required otherwise no. How I can achieve this?
User will select the Resolution field value when doing close transition so if user select "Fixed" then "RootCause" value should required otherwise no.
Can anyone help me to achieve this.
Thanks,
Om
I made through Behavior
import com.atlassian.jira.issue.resolution.Resolution
def RootC = getFieldById("customfield_13502")
def ResF = getFieldById("resolution")
def ResfVal = ResF.getValue() as Resolution
RootC.setHidden(true)
if(ResfVal.name == 'Fixed'){
RootC.setHidden(false)
RootC.setRequired(true)
}else{
RootC.setHidden(true)
RootC.setRequired(false)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You would need a plugin for it.
For example, you could use the Power Scripts add-on:
You could add the SIL validator with a code like this:
if (resolution == "Fixed" and isNull(#{Root Cause})) {
return false, "Root Cause must be set";
}
return true;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wasn't there a posting rule not to promote own plugins? Maybe the rules changed ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I gave a working example. It can be used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And I do not think it can be done out of the box. As far as I understand there can be different resolutions in the Closed status, not only fixed. And your example works, only if there is always the fixed resolution in the Closed status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thomas Deiler- that's why I tend to use "Scripting or automation tools". My sales guys would love me to heavily plug SR all the time, but I try to stick to what Alexey has done here - a working example. If I don't have the example to hand, a non-advert generalisation is better.
(If I must... SR has two ways to do this. A validator similar to the Power Scripts, but also a Behaviour could do it on-screen before the user commits a change)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I gave a working example. It can be used.
Sorry. Didn't now that rule - anyhow I find it personally not that ideal.
And your example works, only if there is always the fixed resolution in the Clos
ed status.
you can set any resolution by the workflow within a transition that will go to one status, not only "fixed". If you have for example 5 different resolutions you can create 5 transitions that are named like the resolution. In echh transition the resolution is set in a post function. What Omprakash requested to do, to make the field "Root Cause" just mandatory for the "Fixed" thing will work. Sure, during the other transitions the field is not displayed.
My sales guys would love me to heavily plug SR all the time
Fine, Nic, that you jump in for Alexey. Most readers will not know who both you are. Lets stop it here - we can continue in "our" space. In respect of our community ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist-how can we do in behaviour ? How to check on screen/transition screen value for Resolution field and then make the filed required ? How to read transition screen value ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thomas DeilerIn my opinion to create five transitions to handle five resolutions is not an ideal solution. But it is up to the reporter to decide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey MatveevMy organization may not be intrusting to buy paid plugin. We have script runner plugin already.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Nic Brough -Adaptavist-, its your lucky day ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Omprakash Thamsetty,
your conditioned field-case will not work with standard Jira. But you could do following with the same effect:
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dear @Thomas Deiler look like this work but only thing is users should click on appropriate transition like "Fixed" or "Close" transition. If Fixed transition clicked by user then root cause field will be required. If user choose Close transition then root cause field may not be appear. But here challenging is users should select the appropriate .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, but it is also challenging to select the right one from the resolution drop-down. It's the same but different located.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.