Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello,
In Jira Server I'm trying to create with the following 3 apps: Checklist, Automation and JMWE, a checklist that appears on a transition screen and based on which checklist (or jira base checkbox custom field) items are checked, create corresponding subtasks for each checkbox checked.
So transition screen -> Checklist -> Based on items checked -> Create new subtasks with description set from issue being transitioned. 3 items checked = 3 subtasks
Don't have scriptrunner but have the 3 addons above.
Any thoughts?
Added the comment below:
So in the transition I'm using the validator for Checklist to see if checklist items >= 1. Then in the post funciton I am using the Create/Clone JMWE function. I am then selecting the caluclated create issue. Inside of that I'm looking at the ChecklistItem Interface and wondering how to iterate over the checklist and for each option then creating a subtask for each of the 10 options in the checklist.
Hi Jonathan,
Developer from Automation for Jira here.
Since you mentioned the field mapping to a "jira base checkbox custom field" you can use the guide above, alternatively you could also use our JQL condition to perform any check you can write with JQL.
It's possible to achieve this functionality by using 3 seperate if/else blocks which each check if your checkbox contains one of the checked fields. We have a new issue condition field which makes this easier with select fields/checkboxes, which you can see in my screenshots below. Your rule would be something like this:
If you would like more help on getting this use-case working, you can contact our support here: https://codebarrel.atlassian.net/servicedesk/customer/portal/1. Or find more information in our docs here: https://docs.automationforjira.com.
Overview:
Condition:
Create sub-task:
This is great. Thanks, Much easier than I thought it would be. It was same as above but with creating a new issue in a separate project. I ended up doing it from a workflow global transition so that the transition screen would show. I coudn't get a transition screen to appear from a manual trigger.
Automation for Jira is amazing, coming from using ScriptRunner for everything before (at a different company) I'm finding Automation is just as powerful in most cases without all the groovy... Also the audit log and alerts for logging too are just awesome. You guys have the best support. Just so impressed. Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan,
the way the Checklist app works is a little unusual. When you use issue.get("checklist field"), it returns a list of all options, not just those that are currently checked like a standard Checkboxes custom field would. So you need to filter the results to just the checked items:
issue.get("checklist field").findAll {it.checked}
This will be your "Iterator script". Then, the "it" iteration variable will contain a com.okapya.jira.customfields.ChecklistItem, the interface of which is actually accessible from the "Interfaces" help tab of JMWE. But in a nutshell, the property you're probably interested in is "name" which returns the name (value) of the checked item. For example, to include the selected item's name in the summary, you could do:
${issue.summary} - ${it.name}
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.
Hi Jonathan,
Checklist for Jira here. When you say:
ChecklistItem Interface and wondering how to iterate over the checklist
Do you have access to the custom field value? If so you can iterate over it as it's simply an array. I know that it's doable with ScriptRunner but you said that you don't have that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was thinking of using the groovy interface in JMWE to access it...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan,
David has described what needs to be done when you get a hold of the custom field value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So in the transition I'm using the validator for Checklist to see if checklist items >= 1. Then in the post funciton I am using the Create/Clone JMWE function. I am then selecting the caluclated create issue. Inside of that I'm looking at the ChecklistItem Interface and wondering how to iterate over the checklist and for each option then creating a subtask for each of the 10 options in the checklist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register Now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.