Forums

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

BEHAVIOURS HIDE AND SHOW

Mateusz Janus
November 24, 2025

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?

 

 

behaviours.jpg

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Trudy Claspill
Community Champion
November 24, 2025

Hello @Mateusz Janus 

The answer on this post describes the solution:

https://community.atlassian.com/forums/App-Central-questions/Hide-custom-field-when-issue-in-certain-status/qaq-p/962687

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

https://community.atlassian.com/forums/Jira-questions/Hide-the-field-or-tab-on-view-screen/qaq-p/3076472

...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.

TAGS
AUG Leaders

Atlassian Community Events