I'm parsing out values from an e-mail created issue and populating fields in a new issue. I've created a Lookup Table and I'm using .match methods and regular expressions to extract the values from the Summary and Description fields.
I'm creating a new issue and populating fields with the values from the Lookup table, like this:
The problem: We have a Select List field called Division. The values I'm getting from the Description in the trigger issue are slightly different than values in the Division select field. I don't have the option of changing either value at the source. So I have to do some kind of lookup and replacement.
For instance, the Division value I'm getting is 'Administrative Services', but the select list field value I need to set is 'Administration'. How can I do a static lookup and replacement to set the select list value correctly?
I've tried making a second Lookup Table with the conversions and using a Smart Value in the .get function for the second list.
{{DivisionLookup.get({{YaypayParams.get("Division")}})}}
This doesn't work. :-(
I likely don't want to do IF/Then statements for each converted value. Yuk! Any ideas how I might elegantly achieve this? I do have ScriptRunner available to me if that helps.
Hope this makes sense and thanks in advance.
Jamie
Once inside of the double-curly brackets, you do not need another set to do that lookup with get(). Please try this:
{{DivisionLookup.get(YaypayParams.get("Division"))}}
Also regarding your overall scenario, the match() function can return a list. Are you ever expecting any of the values in your first lookup table, YaypayParams, to return multiple values as a result of matches?
Kind regards,
Bill
Beautiful! Thanks so much. I figured is was something simple. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There will never be multiple values, at least so I'm told. Thanks again.
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.