Is there a jira-plugin to achieve show/hide tabs in a screen with multiple tabs?

Durgadevi Balasubramaniam November 15, 2017

Hi there,

Please suggest if there is any jira-plugin to show/hide tabs in a screen that has multiple tabs. Or can we achieve this through any other way if not through plugin? The tab has to be shown/hidden based on field selection in one among the tab.

Example scenario: I have a dropdown field in a tab where the user selects a project type. Based on the selected project type the relevant tab has to be shown and other tabs has to be hidden.

Hope this is clear.

TIA!

Durga.

 

4 answers

4 votes
Ethan Foulkes November 17, 2017

Hi Durgadevi,

You can do this using the Power Scripts add-on, which can also do countless other things you will likely want to do with Jira.

Here is a video tutorial walking you through how to show and hide custom fields on different tabs based on a select list value.

I hope this helps!

3 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2017

JIRA treats the screen as one screen regardless of any tabs you setup for organization. If you use a script to hide the fields they won't appear and I believe if you hide all the tabs on a screen the tab won't appear.

1 vote
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.
November 15, 2017

Hello, 

I am afraid you should write your custom Javascript for that.  For easier management of the javascript you could use Jsincluder plugin. It is free.  You can read more here about the plugin

https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.jsincluder/server/overview

BUT changing out of the box interface with a custom javascript is a bad idea because it is prone  to errors and unexpected behaviour. 

Durgadevi Balasubramaniam November 16, 2017

Thanks for clarifying.

0 votes
Omprakash Thamsetty
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.
September 13, 2018

@Durgadevi Balasubramaniam, Did you get this done. I am also looking the same. If yes, how did you do that?

Omprakash Thamsetty
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.
October 12, 2018

I found the showTab() and hideTab() in script runner. I made it work with them based on my requirement. 

Garry May December 12, 2018

Could you post a snippet of your hideTab() code - I can't get mine to work in a Behaviour!?

Thanks in advance

 

import com.atlassian.jira.issue.fields.screen.FieldScreenTab

def issuetype = underlyingIssue?.getIssueType().name

if (issuetype?.toLowerCase() == "document update") {
FieldScreenTab tab = getFieldScreen().tabs.find {
return (it.name.toLowerCase() == "some tab name")
}

if (tab) {
hideTab(tab)
disableTab(tab)
switchTab(0)
}
}

Suggest an answer

Log in or Sign up to answer