Hide specific issue type in Create screen drop-down using js

Egor Erofeev July 24, 2018

Hello, 

I want to hide specific issue types for any project using js in  "issue type" dropdown, so the user won't be able to create issue of my type (it can be generated only automatically)

I've tried several solutions but nothing worked out for me:

https://community.atlassian.com/t5/Jira-questions/Hide-Issue-Type/qaq-p/216594

https://community.atlassian.com/t5/Jira-questions/Hide-select-lists-of-Project-and-Issue-Type-from-the-Create/qaq-p/241794

https://community.atlassian.com/t5/Jira-questions/Hide-select-lists-of-Project-and-Issue-Type-from-the-Create/qaq-p/241794

 

Also I'll need to disable inline editing(using js).

Could you provide working example to hide specific issue type?

Best regards.

1 answer

0 votes
Cristian Rosas [Tecnofor]
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 24, 2018

Hi @EG

I guess that you don't want add-ons, as it is already done.

I haven't tried it before but... is it possible to create an issue type in a project without it added to the issue type scheme via API?

If the issue type created automatically is not in the issue type scheme, it will not be showed in the creation screen, and maybe it can be still created via API.

If you try it, tell me if it works!

Egor Erofeev July 25, 2018

@Cristian Rosas [Tecnofor], thanks for reply.

Unfortunately if the issue type is not in the proper issue type scheme, it is not possible to create issue with it via API. (though it is not displayed in the creation screen)

Response: 400

{"errorMessages":[],"errors":{"issuetype": "The issue type selected is invalid."}}

Workaround: First I was adding my issue type to project scheme every time before creating/updating the issue and then removing it from the scheme, but, of course, such trick cannot be considered as valid option for production.

So I'm looking for JS solution.  

Regards

Cristian Rosas [Tecnofor]
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 30, 2018

Hi again Egor

I don't have a JS solution unfortunately but I have already tested a workaround. You can create issue types via workflow post functions and the issue type do not need to be in the issue type scheme.

You could have an issue with a workflow that creates different issue types based in your needs and call the transitions via API.

Not the best option but it works...

Suggest an answer

Log in or Sign up to answer