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
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)
Rather than Validators you could have two Conditions: one for the only in group and the other for field value.
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.
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;
No No > Yes
Yes No > Yes
@David Fischer This is working perfectly!
Thank you!
It looks like you're new here. Sign in or register to get started.