Forums

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

How to restrict closing tickets with specific label

Kinga Kubijk April 14, 2022

I need to restrict option to resolving tickets with specific label to few people. Is it possible?
I know there is an option to restrict via project settings->permissions->"resolve issue" and restrict to specific roles or groups but I need this only for ticket with specific label. it is not possible in that way. Do you have any suggestion?

4 answers

4 accepted

0 votes
Answer accepted
Oliver Siebenmarck _Polymetis Apps_
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.
April 20, 2022

Hi @Kinga Kubijk ,

As everyone already stated, this is absolutely possible. I'll give you one more option using Jira Expressions, an easy-to-learn language that is behind pretty much all custom conditions/validators in Jira Cloud.

You'll want something like this: 

user.groups.filter(g => g == "administrators").length > 0 || issue.labels.filter(h => h == "label1").length >0

This expression has two parts, the first one checks if the current user is in the group "administrators", if so: Great, the condition passes. If not, the second part checks for the presence of "label1" in labels. If it's there: Great, the condition passes. If not, well then no transition for you.

You can of course build much more complex conditions with Jira Expressions, but this should give you an indication of what's possible.

Now, how to add a custom condition into your workflow? As @Nic Brough -Adaptavist- said, you'll need an app for that. Personally, I like Cloud Workflows, but that's because I was heavily involved in its creation. I believe virtually all Workflow apps for Jira Cloud now support Jira Expressions, so no matter which one you choose, the above should work for you.

Hope that helps,
 Oliver

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
April 14, 2022

Use a condition or validator that basically says "if label = xyz, then return false"

A condition will hide the option to transition the issue

A validator will let the user trigger the transition, but then take them back to where they were before with an error message (which you can set if you're using certain types of validator)

Kinga Kubijk April 15, 2022

How I can set up "IF" in conditions or validators to not block the option to close ticket if this one specific label is not applied. I do not see "if" option.
I have two scenarios:
1) tickets with "label1" -> everyone should be able to resolve ticket with out any conditions.
2) tickets with "label2" -> only administrators should be able to resolve ticket.

Nic Brough -Adaptavist-
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.
April 15, 2022

You'll need one of the scripting or advanced workflow function apps to do that specifically, but the way Jira does conditions is by grouping the checks together in blocks, so you can do things like

  • user is in group X
    • and user is in group Y
    • and user has resolve permission
  • due date is not past
John Funk
Community Champion
January 18, 2023

@Kinga Kubijk  - Did this solve your question?

0 votes
Answer accepted
Ed Gaile _Atlanta_ GA_
Community Champion
April 14, 2022

probably a couple ways to handle this, but you could always put the specific users in a group. Then add a condition or validation on the transition to your resolution status to only allow that group to transition if label/s contains xyz.

0 votes
Answer accepted
Dave Mathijs
Community Champion
April 14, 2022

Hi @Kinga Kubijk 

You can add a condition Value Field to your transition in the workflow of that issue type. Additionally, you add a User Is In ... condition to limit it to a few people.

Suggest an answer

Log in or Sign up to answer