Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to hide issue type?

Teja June 8, 2016

Hi,

I wanted hide issue type without removing from the project, is it possible?

 

image2016-6-9 10:19:51.png

Thanks in advance 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Cristina_Abunei
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.
June 8, 2016

Hello.

I think you can set a condition, on the create transition, that will only allow certain users or groups to create issues with that type. There is also a "Hide transitionfrom user" condition that means that the creation of  issues of that type can only be triggered from a listener or a workflow post-function.

You might need to install ScriptRunner to have these options, I'm not sure. You should be able to do something similar with the Behaviour plugin but I find ScriptRunner to be a lot easier to use.

Teja June 9, 2016

OK, got it.

Thank you very much 

Serhii Riabovil June 30, 2017

Create transition doesn't have Conditions, only Validators and Post-functions

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2016

Hi Teju,

By design it is not possible to achieve this using the behaviours module of Script Runner as Behaviours is keyed off the issue type.

The only way you can do this is to add a Behaviour to the issue type field which makes the field hidden for that project for that project and then have a second select list field where the user can check the correct issue type to use and have this set the issue type in order to prevent invalid issue types being used.

I understand this workaround is not ideal but this is the only way to achieve this requirement using ScriptRunner.

The code and config screenshot below show how I implemented this workaround on my JIRA 6.4.12 instance.

 Code:

 

import com.atlassian.jira.component.ComponentAccessor

// Get Issue Type Field as a constant value
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE

// Get Issue-Type select list field and its value
def issueType = getFieldByName("Issue-Type")
def issueTypeVal = issueType.getValue() 

// If Bug selected set Bug Issue Type
if(issueTypeVal =="Bug"){
   getFieldById(ISSUE_TYPE).setFormValue("Bug")   
}

// If Story selected set Story Issue Type
if(issueTypeVal =="Story"){
    getFieldById(ISSUE_TYPE).setFormValue("Story") 
}
    
// If Task selected set Task Issue Type
if(issueTypeVal =="Task"){
    getFieldById(ISSUE_TYPE).setFormValue("Task") 
}

 

Config:

image2016-6-9 16:31:40.png

I hope this helps

Kristian

Teja June 10, 2016

Hi Kristian,

I tired this code but didn't work for me. 

Here is the snapshot : 

image2016-6-10 17:44:47.png

And I have added mapping also. Did I missed anything ? 

 

Thanks

Teju

Heshan Manamperi
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.
July 12, 2016

Is above script worked? It's not working for me too. Anything missed? 

Ratna Kumar Lekkala August 11, 2017

Kristian,

where is the user role/group based restriction in your solution?

0 votes
Łukasz Szarecki June 8, 2016

Helllo,

At marketplace you can find plugin called Issue Type Filters. The plugin isn't very expensive and allow you to quickly hide issue types at creation dialog without complicated configuration.

.
Best regards!

Teja June 9, 2016

Hi Łukasz Szarecki

Thanks for your suggestion.

 

 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events