Add new Permission to the Permission Scheme

Madhu Reddy December 9, 2019

I want to add new permission to my Permission scheme.

Usage : 

I have to restrict some transitions ( Cancelled ) to some groups ( Group A ). 

Tried to add workflow Validator for that transition.. There we can add validator only based on the Permissions.. So that I want to add a new Permission to my Permission Scheme. [ Here there is an option to add condition where user cannot see that status , But I want to show status to user but he must not be able to transition it ].

Could you please help me on this regard. 

I am very happy to hear if there is any other workaround for this. Thanks in Advance. 

10 answers

2 votes
Radhika Vijji _Innovalog_
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.
December 9, 2019

Hi Madhu,

With JMWE Scripted Groovy validator you can write a simple script to configure this validation. Something like this:

currentUser.isInGroup("Internal Leads") || currentUser.isInGroup("External Leads")

And then provide the error message in the "Error message" field.

Regards,

Radhika

0 votes
Madhu Reddy December 10, 2019

Hi @Radhika Vijji _Innovalog_ I have Upgraded my JMWE version and it worked for me. 

Thanks a lot...

0 votes
Radhika Vijji _Innovalog_
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.
December 10, 2019

Hi Madhu,

Which version of JMWE are you using? You should use 6.1.0 or above (current version is 6.2.0). Upgrade, retry and let me know.

Regards,

Radhika

0 votes
Madhu Reddy December 10, 2019

Hi @Radhika Vijji _Innovalog_ Thanks for your response.

I have tried your script and its not working as expected. Attached screenshots for your reference. Could you please look into this and correct me if I was wrong, Thanks in Advance.

Workflow code 1.PNGWorkflow Code.PNGWorkflow error.PNG

0 votes
Madhu Reddy December 9, 2019

Hi Alex, 

 

We are already using JMWE & Automation for Jira..

And I am no more allowed to use Plugins.. Without addons is there any way which could help.

0 votes
Alex Laycy
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.
December 9, 2019

Hi Madhu,

 

In that case, the easiest route forward could be to use the workflow essentials plugin which enables project role and group validators.

 

- Alex

0 votes
Madhu Reddy December 9, 2019

Hi @Alex Laycy 

If users are unable to see the transition some times they might not be aware of what to do. And which to use.

If the transition then they will be aware and they may request leads to do so. That's our point. 

0 votes
Alex Laycy
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.
December 9, 2019

Hi Madhu,

 

Is there a particular reason why you want the other users to be able to see a transition that they won't be able to transition issues to?

 

Is there a certain behaviour your looking to either encourage or discourage?

 

- Alex

0 votes
Madhu Reddy December 9, 2019

Hi @Alex Laycy 

Yes, I have 2 groups [ Internal Leads , External Leads ].. Those two group members should only have the access to Change the status to "Cancelled". 

Others Should be able to see the status "Cancelled", but when they try to change the status to "Cancelled", Jira should through the error saying "You don't have access to change the status to Cancelled, Please contact Jira Admin"... Anyway the error message is default. 

 

How to achieve this, if I add a new permission.. This can be achieved as I expected. 

 

Could you please help me.. Thanks in Advance.

0 votes
Alex Laycy
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.
December 9, 2019

Hi Madhu,

 

You can't add custom permissions as far as i'm aware unfortunately.

 

As Validations are done when you execute a workflow transition though, rather than before (which are Conditions), you could set the validation required to be a permission that you know those users won't have or require a certain field to be updated prior. 

 

Are there any particular users that you want to be able to transition to this status?

 

If the business conditions can be shared, then i'm sure a suitable workaround can be thought of :) 

 

- Alex

Suggest an answer

Log in or Sign up to answer