Hey Jira Brothers and Sisters,
i am just a Script Runner beginner and need some advice or even ready-to-go script if I may ask.
Ticket Type: EPIC
Fileds: Custom_1 and Custom_2
Workflow: to do, in progress, done
The goal is, I am trying to set up BEHAVIOUR when Custom Field 1 and 2 are visible on ticket details ONLY when ticket status is DONE...
I watched a looot of youtube tutorials here but since i dont have any Groovy background i am lost a little bit. Can anyone help me with this I guess simple script?
Hello @Mateusz Janus
The answer on this post describes the solution:
You need to add the script to the Initialiser area. Don't add fields to the Behaviour.
if (underlyingIssue.getStatusObject().getName() == "Done"){
getFieldBy('Custom_1').setHidden(true)
getFieldBy('Custom_2').setHidden(true)
}
Note that only works on the Edit screen. Behaviours don't work to hide fields on the View screen.
As described in the answer on this post
...to hide a field on the View screen you need to use ScriptRunner Fragments. I have not worked with Fragments before so I am not sure how to implement that solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.