Forums

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

How to Hide multiple Tabs using Behaviors in jira

J Manas Kumar
Contributor
November 25, 2019

how can i close multiple tabs using Behaviors, Currently i am able to hide only one Tab, but i want to hide multiple .. i have added the code snippet below please anyone can help me..

 

if(getFieldByName("Project Type").getValue() as String != ''){
def projectType = getFieldByName("Project Type").getValue() as String

if(projectType == "Waterfall") showTab("CITMS Mandatory Business Requirements")
else hideTab("CITMS Mandatory Business Requirements")

}
//else showTab("Control and Security Requirements")

 

Using this i am able to close only one Tab, but like this tab i want to close another 2 tabs..

1 answer

1 accepted

0 votes
Answer accepted
Antoine Berry
Community Champion
November 26, 2019

Hi @J Manas Kumar ,

Simply use add hideTab multiple times : 

else {
hideTab("tab 1")
hideTab("tab 2")
...
}

Antoine

J Manas Kumar
Contributor
November 26, 2019

Thanks For your reply @Antoine Berry  but Sorry i think i have posted the different requirement.

Let me explain my complete requirement, i have 9 tabs total, out of those i  need to show only 6 tabs when Project Type == "Agile" (3 tabs will be hidden).

and i need to show all 6 tabs + those 3 tabs(which are hidden)  when Project Type == "Waterfall"

 

any idea..?

J Manas Kumar
Contributor
November 26, 2019

Hi @Antoine Berry  issue resolved .. your ans helped me thanks...

Antoine Berry
Community Champion
November 26, 2019

You are welcome. If the answer is satisfying, please mark it as answered or let me know if you want me to edit it to fit the question more accurately.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events