Hi,
I'm trying to mimic how Jira Data Center shows "Completed Sprints" (which is not actually a field) but shows in the Jira UI like below:
I figured out how to get that to look the same (with exception of link to sprint, would be nice to get that part as well). However, when there is multiple sprints the UI shows it in this format:
But the automation I write prints it like this:
My JSON in Automation is configured like this at the moment:
{
"fields": {
"customfield_36808": "{{issue.fields.customfield_10100.name}} - ended {{issue.fields.customfield_10100.completeDate.format("dd/MMM/yyyy")}}"
}
}
Any help in how I can get this to populate the way the Jira UI populates it would be greatly appreciated
Hi @Amed Moreno
Are you trying to get a list of completed sprints for a single issue, a collection of issues, something else?
To get what you described for a single issue, that has been in multiple sprints, please try this using an iterator over the sprint list field:
{{#issue.sprint}}{{name}} ended {{endDate.format("dd/MMM/yyyy")}}{{^last}}, {{/}}{{/}}
I used a comma delimiter, which you could replace as you need.
Kind regards,
Bill
Hi @Bill Sheboy ,
Thanks so much! That worked. I'm trying to get a list of completed sprints for a single issue, I just couldn't understand how to get the format to come out the right way.
Do you know of a way to get it to print, instead of comma separated, in a list form (separate lines that is)? Would that be possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, I figured out the answer to my previous question. By using \\\\ as delimiter and if I change the multi-line text field from default renderer to wiki, it prints in separate lines.
Thanks again for the help on this!
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.