Hide Issuetypes from displaying during Move Jira screen

Vasanta Kumaar March 15, 2021

Hi All,

 

I have currently hidden issuetypes from the create screen using script runners, but while we are moving the JIRA, users are able to still see the hidden issuetypes.

How can we hide those issuetypes same as I did in Create screen.

So When a user tries to move a issue from another JIRA project to Target Project they should not see hidden issuetypes.

Can anyone suggest.

 

Thanks,

Vasantakumaar

 

 

1 comment

Comment

Log in or Sign up to comment
Mario Carabelli March 16, 2021

The documentation from Scriptrunner Staates that this isn't possible (https://scriptrunner.adaptavist.com/6.20.0/jira/behaviours-limitations.html#_screens).

What do you want to achieve?

Vasanta Kumaar March 16, 2021

Hi @Mario Carabelli ,

 

In one of the JIRA project (Project A), I have hidden 3 issue types based on user roles to avoid creating jira with those issuetype.

So Whenever user tries to create a JIRA user will not see those issue types.

Recently the owner of the project has raised a concern that whenever a user from other JIRA project tries to move issue to this project A, they are able to view all the hidden issuetypes as well in the dropdown.

So our requirement is to hide the issuetypes in Move issue screen as well or is there any way to restrict the user to create jira's with those issue type.

 

Thanks,

Vasantakumaar

Mario Carabelli March 17, 2021

Hey @Vasanta Kumaar

thank you for the additional information. In this case you can use a special workflow in the project and restrict the "Create-Transition" of this workflow with a scripted condition/validator.

What you do logically is:

check if the executing user is or isn't a member of the roles with the permission to create issues of the restricted issue types. If he/she isn't a member then let the condition/valdiation fail if yes let it suceed.

Because the workflow isn't bound to the javascript UI (as behaviours are) you will disable the creation of these issuetypes also in the move action (and in bulk move operations).

Some pointers for the implementation can be found here: https://community.atlassian.com/t5/Jira-questions/Script-Runner-Restrict-creation-of-specific-issue-type-for/qaq-p/344865.

I unfortunately don't have the time to script it out for you right now but I hope it helps you to fullfill your requirement.

Good luck,
Mario

Vasanta Kumaar March 17, 2021

Hi @Mario Carabelli ,

 

Thanks for information.

I tried to implement using validators in script and it works well by restricting user to create in create screen level, but not working during moving issues.

I can able to move issues without any restrictions.

Thanks,

Vasantakumaar 

Mario Carabelli March 17, 2021

HI @Vasanta Kumaar ,

Then I have learned something today. I was sure that this would prevent the move. I guess in this case I don't have another idea to solve this issue despite removing the default move issue permission from the users to evade the problem (if you can't solve it).

Regards Mario

Vasanta Kumaar April 22, 2021

Hi @Mario Carabelli ,

 

Yeah As you told we can remove move option, but we cannot restrict it in all JIRA projects right. 

I am also doing some test but not able to sort it out.

 

Thanks,

Vasantakumaar

Mario Carabelli April 22, 2021

Afaik everyone can move who has the "move issue" permission in the source project and the "create issue" permission in the destination project. (https://confluence.atlassian.com/jiracoreserver/moving-an-issue-939937918.html).

So if you change the the permission scheme(s) in a way that no one / only selected groups have the move permisison you should be golden.

What did you try so far?

TAGS
AUG Leaders

Atlassian Community Events