I'm Trying to create a Summery of tickets by department to be sent out, But However I try to convert the smart value to text. Nothing shows up.
Lookup work items -- JQL Statment returns 100
Create Dynamic lookup Table -- issue.Custom Field.value is key and issue.key
send email My smart value statment inside of ritch text using a code snippit is
{{lookupIssues.get(Business Solutions).charAt.join("\n* ")}}I have also tried
{{lookupIssues.get(Business Solutions).join("\n* ")}}
{{lookupIssues.get("Business Solutions").join("\n* ")}}
Hi @Drew Wise
Short answer: based on what you describe, you cannot summarize the work item keys for each custom field value that way, and will need another approach.
What is seems you are trying to do is:
That will not work as the row keys need to be unique (even though that is not validated when the table is built); thus, the "last one wins" when creating the dynamic table.
And...based upon your description, your rule uses the Lookup Issues action and the Create Dynamic Lookup Table action...thus, there are two versions of the get() function involved:
If you have a known list of values such as "Business Solutions", you could just use the Lookup Work Items with list filtering. For example, with some made up values:
Business Solutions Items
------------------------
{{#lookupIssues}}
{{#if(equals(customfield_12345.value, "Business Solutions"))}}
* {{key}}
{{/}}
{{/}}
Architecture Items
------------------------
{{#lookupIssues}}
{{#if(equals(customfield_12345.value, "Architecture"))}}
* {{key}}
{{/}}
{{/}}
...
Another way to do this is to use the original Create Lookup Table with the filter I show, and then just parse the entries. For example:
{{#tblFieldAndKeys.entries}}
{{#if(value.size.gt(0))}}
{{key}}
--------------------
{{#value}}
* {{.}}
{{/}}
{{/}}
{{/}}
This second method relies upon something I just remembered: the row-value for a lookup table preserves the typing, and thus if there were any work item keys found for your custom field value, the saved value is a non-empty list...which can be checked with size.gt(0) and then iterated to produce the sections.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.