So am trying to combine the JMWE Set Field function with HeroCoder's Issue Checklist Pro functionality.
The goal is to dynamically build an ongoing checklist of actions as an issue progresses through the workflow as a series of post-functions.
I am using the Checklist Text field to add formatted checklist items to the "Checklist".
I attempted to use the standard Jira update custom field function but when you use the append option Jira automatically inserts a blank line, which Issue Checklist Pro interprets as a new checklist... it gets ugly.
My thought is to use the JMWE Set issue fields post-function to:
Issue Checklist Pro uses the following formatting:
# Default Checklist
* ---HR Checklist
* [open] Send Welcome Letter
* [open] Send SWAG
* --- denotes a header
The goal is to add additional lines following the structure above, with no additional line breaks.
So after the second transition, the field might look like:
# Default Checklist
* ---HR Checklist
* [closed] Send Welcome Letter
* [closed] Send SWAG
* [open] Do the next thing
I do need to keep the updated statuses of the work in progress, which is why I was thinking about querying the contents prior to updating them.
Thoughts?
And resolved:
Don't need to use the Build-your-own (scripted) Post-Function from JMWE, just use the Set issue fields function.
Use the same script developed above:
{% set checklist = issue.fields.customfield_10073 %}
{% set items = [checklist, '* [open] Do the next thing', '* [open] Do the next next thing'] %}
{{items | join("\n")}}
And you can add as many of the '* [open] Do the next thing', as you like.
There is a small delay before the checklist is updated, but it does so dynamically, so no need to for the user to refresh the screen.
I'm glad that you have this sorted out, although I'm surprised to read that editing the Checklist Text field with a post function adds an unwanted empty line to the field. I have just tested it and have not observed similar behavior, see the screenshots below:
and the result in Checklist Text field:
and in the app's UI:
I'd like to learn more about your setup to try and solve the core issue for you.
As for workarounds, there is another one that does not require any other apps - with Jira Automation.
The rule is simple:
Trigger - Transition issue (any setup that suits your needs here)
Action: Edit Issue: Checklist Text field.
In the Checklist Text we put:
{{issue.Checklst Text}}
--- test header
* [] new item to add with Automation
>> a description for that new item if needed
* [] another item, due on {{now.plusDays(14).jiraDate}}
* [] yet another item assigned to @{{issue.reporter.id}}
The additional items are here just to highlight how much can be done with Automation and Checklist Text.
We put the {{issue.Checklist Text}} smart value at the top so all that follows is appended and does not replace what was previously there.
Please let me know more about your issues with the post function. Feel free to reach out to us via our service portal if you'd like to discuss it in detail.
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Wojciech Wardaszko thanks for the catch! My mistake in reporting, I was updating the YAML block, not the text block.
Thanks for pointing out the use of {{issue.Checklist Text}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Wojciech Wardaszko and this is on a Jira Work Management project to add another layer of complexity...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think this complicates anything, unless it's a team-managed (aka next-gen) project?
In that case some of our custom fields are unavailable at this time... bummer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using JMWE's Build-your-own (scripted) Post-Function I have managed to get the new items added using the following script:
{% set checklist = issue.fields.customfield_10073 %}
{% set items = [checklist, '* [open] Do the next thing', '* [open] Do the next next thing'] %}
{{items | join("\n")}}
But now am trying to figure out how to update the field with the joined set.
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.