Is it possible to create a validator (using a JMWE script), use it in a transition and have it add users (only add, not delete) in a Multiple Pick User Custom Field and keep the original user from being modified? Any ideas on what script I could use to achieve this?
Custom Field I'm using:
you can create a Scripted Validator with the following code:
issue.get("My user picker")?.containsAll(originalIssue.get("My user picker"))
Note that you cannot test this script using the Test Groovy Script button, you can only test that the validator actually works (because the originalIssue variable only works during an actual transition)
Thank you for your input. Sadly, the code provided results in the following error. I wonder why that is. Any clues? Also, This is for Jira Data Center.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I mentioned in my answer, you cannot test the script using the script tester, you need to deploy the validator and test the transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are correct, my bad. It worked, thank you for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm glad it worked!
Can you please "accept" the answer so that others can benefit from it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.