Having a bit of a puzzling issue here...
Scenario:
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.
Workflow:
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")}}
Result:
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?