Having a bit of a puzzling issue here...
I'm trying to create an automation on JSM. I want a comment to be added to the request based on whats been selected in a multi select custom field.
Dependant on what has been selected it will link a sharepoint link corresponding to the option(s) selected.
When: Issue Created
IF: Product Portfolio is not empty
Then: Create lookup table {{sharePointLinks}}
And: Add comment to issue
Lookup table:
---
Option 1 : CatLink
Option 2 : DogLink
Option 3 : LiopleurodonLink
Comment template:
---
Documentation links:
{{#issue.fields.customfield_XXXXX}} - Debug 1 {{value}}: {{sharePointLinks.get(value)}}
- Debug 2 {{value}}: {{sharePointLinks.get(string(value))}}
- Debug 3 {{value}}: {{sharePointLinks.get(value.trim())}}
- Debug 4 Test: {{sharePointLinks.get("Option 3")}} {{/issue.fields.customfield_XXXXX}}
Test Lookup: {{sharePointLinks.get("Option 3")}}
With Option 1 and 3 selected, I get the following output:
Documentation links:
- Debug 1 Option 1:
- Debug 2 Option 1:
- Debug 3 Option 1:
- Debug 4 Test:
- Debug 1 Option 3:
- Debug 2 Option 3:
- Debug 3 Option 3:
- Debug 4 Test:
Test Lookup: LiopleurodonLink
Expected Result:
Documentation links:
- Debug 1 Option 1: CatLink
- Debug 2 Option 1: CatLink
- Debug 3 Option 1: CatLink
- Debug 4 Test: LiopleurodonLink
- Debug 1 Option 3: LiopleurodonLink
- Debug 2 Option 3: LiopleurodonLink
- Debug 3 Option 3: LiopleurodonLink
- Debug 4 Test: LiopleurodonLink
Test Lookup: LiopleurodonLink
Theory:
For some unfortunate reason it looks like the data stored in the lookup table is not able to be called for, from within the context of the smart value loop, Is there anyone out there that has tried similar and got it working with lookup tables so you don't end up having to maintain a smart value if soup?
Hi @Iain Powrie -- Welcome to the Atlassian Community!
This is a long-standing limitation of automation rule iterators: only information at the iterator scope, and lower, is visible inside.
Here is an open suggestion to change that behavior: https://jira.atlassian.com/browse/AUTO-490
For this scenario, the possible workarounds are:
Kind regards,
Bill
Hi @Bill Sheboy , Thanks for the warm welcome!
Darn, had a feeling that'd be the case. That's a shame, as LU table would have been great for other users to 'easily' amend the responses without worrying about syntax.
Not to worry though, I'll register my interest on that suggestion, and follow one of your workarounds.
Thank you kindly for your insight!
-Iain
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.