Forums

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

Hide transition based on labels

Madhura A S
Contributor
March 24, 2022

Hi,

I want to hide the transition 'In validation' if label contains the value 'CX' or 'SCA'

1. Resolved-> close Issue ------(hide 'In validation' if CX or SCA  present in label field)

2. Resolved ->In validation->Close Issue (If CX or SCA not present in label field)

I tried with 'value field' condition as below

condition.png

But transition is not hidden when label is CX or SCA.

This works fine if i add only one condition

Can you please provide your thought on this

Thanks ,

Madhura

 

3 answers

1 accepted

1 vote
Answer accepted
Clark Everson
Community Champion
March 24, 2022

Hi Madhura,

I would advise against this. Labels can be entered incorrectly very easily. If you are going to hide things in transitions that you use a field where there can't be data put invalidly such as a select list custom field

Best,
Clark

Madhura A S
Contributor
March 24, 2022

Yes @Clark Everson . But this is the requirement from our user. They will have to make sure that label is correct.

i am not able to understand why my condition is not working.

Clark Everson
Community Champion
March 24, 2022

Hi @Madhura A 

There will be many cases as a Jira admin where you need to work with the user to make sure Jira stays functional. The best thing to do as a Jira admin is to work with them on what they are actually trying to accomplish and finding the best way in Jira to do it to prevent long term performance issues.

 

This may also be a limit of labels. Labels do have a lot of limits.

Looking at some other posts https://community.atlassian.com/t5/Jira-questions/Transition-permitted-based-on-label/qaq-p/1041727 you would need a plug-in to be able to do this. it's not a native feature.

 

So unless you have scriptrunner or JSU it may not function. Being in cloud it may not be something possible as well as those applications sometimes don't have all the same features as the Data Center versions.

Best,

Clark

Madhura A S
Contributor
March 24, 2022

Thanks @Clark Everson 

2 votes
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.
March 28, 2022

Hi @Madhura A ,

Expanding on @Clark Everson excellent answer, as a self-proclaimed expert on labels and workflow conditions in Jira Cloud.

First, what you want to achieve is absolutely possible, although you will need an app for this.

Second, I would not recommend using labels in this case. But if you absolutely must, here's how:

As I mentioned before, you will need an app that supports Jira Expressions. My personal recommendation is Cloud Workflows, both because I worked at Jodocus and because I like Cloud Workflows a lot. That being said, virtually all apps that offer custom conditions also offer Jira Expressions, so there are many, many options to choose from.

Once you have chosen an app, add a Custom Condition and enter the following Jira Expression:

!(issue.labels.includes("CX") || issue.labels.includes("SCA"))

This expression will check whether the label CX or SCA is present and then return false, thus hiding the transition.

And that's it! Jira Expressions are an extremely powerful, albeit slightly complex way of building conditions/validators.

Hope that helps,
 Oliver

Madhura A S
Contributor
March 29, 2022

Hi @Oliver Siebenmarck _Polymetis Apps_ ,

Thanks for the Response.

In Jira server I was able to achieve it using JMWE plugin. In cloud we dont have any plugins yet. So I was thinking if there are any native features in cloud which allow me to achieve this. We are keeping this request on hold until we get some plugin which allow us to get this done.

Regards,

Madhura

0 votes
Michael Aglas
Contributor
June 2, 2023

It is an logical issue here. If you just have one of these labels set, you will always be able to see the transition. You need just to switch the condition combination from being any to all.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events