Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Transition validator with a condition

Edited

Hello,

I'm trying to configure a validator that will check a certain field, and only if the value is x, then the transaction can be made only by members of a certain group.

I have ScripRunner & JMWE.

Can it be done?

Thanks

2 answers

1 accepted

0 votes
Answer accepted
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 26, 2023

Hi @Neta Knyazhansky Caspy 

you can use a JMWE Build-your-own Validator with a script like:

!issue.customfield_12345 || issue.customfield_12345.value != "QA" || user.groupIds.includes("727f8cab-34e5-4cfe-ada1-b0c8452531f2")

where  customfield_12345 is the custom field ID of the "found by" field (you can find it on the "Issue Fields" help tab), assuming it's a SIngle-Select custom field, and 727f8cab-34e5-4cfe-ada1-b0c8452531f2 is the group ID (you can find it using the "Lookup group..." button in the editor toolbar)

@David Fischer _Appfire_ This is working perfectly!

Thank you!

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 21, 2023

Rather than Validators you could have two Conditions: one for the only in group and the other for field value.

2023-11-21_09-54-22.jpg

Hi @Jack Brickey

Thank you for taking the time to reply.

Can I make them work together?

My use case is that only the QA team will be able to close bugs that were created by them.
I have a field called "found by", so if the value there is "QA", then only member of the group can close, but otherwise, anyone can close.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 24, 2023

Conditions are "and" in nature so if you have both then both must be true. So the logic table is like this...

QA group  Found-by-QA    >   Able to transition?

      No                 No             >            No

      No                 Yes            >            No

      Yes                No             >            No

      Yes                Yes            >            Yes

@Jack Brickey I need to logic table to look like this;

QA group  Found-by-QA    >   Able to transition?

      No                 No             >           Yes

      No                 Yes            >            No

      Yes                No             >            Yes

      Yes                Yes            >            Yes

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 26, 2023

You can't do that OOTB. Well you could use Automation to undo the transition if not allowed but that isn't very desirable.

@Jack Brickey I have ScripRunner & JMWE, can either help?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 26, 2023

Yes, I'm sure SR can be used here but I have not personally done this. I recommend searching the community for similar, e.g. "multiple field condition transitions with Scriptrunner" or similar.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events