Forums

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

Changing behaviour for Issue creation from the "Agile Board Backlog" screen with Scriptrunner

Dylan August 3, 2020

Dear experts,

We are trying to limit the Issue types available depending on the user Role on a project.

Based on this, https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/restricting-issue-types.html, we are able to have this limitation for a standard issue creation via the normal button as shown below:

create_issue_standard.JPG

The issue occurs when being in the "Agile Board" backlog where there is also a shortcut on the bottom of the screen for creating issues as shown on the picture below:

create_issue_backlog.png

 

  • Is it possible to also target the behavior of this "Create Issue" shortcut via a Groovy script ? The link provided above does not impact this element.

Many thanks for the support,

Dylan

1 answer

0 votes
Dylan August 13, 2020

I found a workaround for this by using Validators and behaviors in the "Create" transition (first transition) of our workflow.

Thanks to ScriptRunner, I restrict the issue creation to specific types and roles:

devIssueTypes.contains(issue.issueType.name) && "Developers" in projectRoles 

The only problem is that this option does not change the UI and there is still the possibility to select among all the issue types when creating the issue.

Therefore, Developers (they can't create a bug) will still be able to select the "Bug" issue type as shown below.

backlog_creation.JPG

Then the validator will run and open the "Create Issue" window while generating an Exception and only then the behaviors will restrict the the types, in the UI, to only three (Story, Task, Defect).

issue_creation_dev.png

  • Is there a way to modify the UI of the issue creation in the backlog to hide the issue types a user doesn't have the rights to create ?

Thanks,

Suggest an answer

Log in or Sign up to answer