Jira Cloud...
I would like to create a multi-line text field by concatenating the values of an arbitrary multi-line text field from all subtasks. The values would be separated by a newline.
Better yet would be to generate the value from each subfield with (KEY-123 - Value).
The use case is when reviewing an issue to confirm something, we would need to confirm each of the subtasks. We would like to (on a particular transition) bring the values all to one place.
The source field could be Description (ideally prepended by Key). The destination field would definitely be a custom field.
I've tried the following using JMWE:
{{issue.fields.subtasks | join(",\n" , "description")}}
This works if I use "key" (lowercase only) instead of "description".
I've also tried:
{{issue.fields | field("fields") | join(",\n", "description")}}
This even works for "summary", but still not for "description".
Hi @Ted Timar ,
you can easily achieve this using a Set Issue Fields (JMWE app) post function. Select the destination custom field as the field to set, and use this as the value:
{% for subtask in issue | subtasks( "description" ) %}
{{subtask.key}} - {{subtask.fields.description}}
{% endfor %}
That code assumes you want to gather values from each sub-task's Description field - replace the sub-task field (here "description") on lines 1 and 2 with the desired field ID (such as customfield_12345 for a custom field).
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.