Scripted (Groovy) Condition for "projectlead"-Option

Jurica Petricevic
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.
June 28, 2021

Hi Community!

 

Is it possible to put a "projectlead"-option as a condition for one transition on the workflow?

 

I think I've seen something like this somewhere before like Scripted (Groovy) Condition.

 

Thanks in advance.

 

Best regards

3 answers

0 votes
Suprija Sirikonda _Appfire_
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.
June 29, 2021

Hi @Jurica Petricevic ,

If you want a transition to be available only for the project lead, then you can achieve your requirement using JMWE.

Add a "Scripted (Groovy) Condition (JMWE app)" condition on the transition and add the below Groovy script : 

currentUser == issue.projectObject?.projectLead

 Hope this helps!

Regards,

Suprija

0 votes
Anjali Rao June 29, 2021

Hi @Jurica Petricevic ,

Do you mean the transition must be visible to only the project lead of that project?

Thanks,

Anjali

0 votes
Niranjan
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.
June 28, 2021

Hi @Jurica Petricevic - Scripted (Groovy) Condition comes with JMWE plugin. You can use a simple workflow condition with Scripted (Groovy) Condition.

projectLead='Jurica'

Jurica Petricevic
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.
June 28, 2021

Yes @Niranjan , but that workflow is shared true multiple projects and I try to make one standard for all those projects. It is necessary that in each new open project Projektlead can initiate certain transitions.

 

Do you understand what I mean?

 

Thanks for the reply.

Niranjan
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.
June 29, 2021

Hi @Jurica Petricevic ,

You can use this Scripted (Groovy) Condition-

issue.getProjectObject().getLead().equals(currentUser)

Suggest an answer

Log in or Sign up to answer