Hi hope everyone is doing well
I want to create a rule where I want to create a task when the epic status is change but the condition is there must be a specific task present inside the epic so it can create the new task otherwise it cant i.e
If the epic transit from in progress to ready to Pulish then if epic have the task name tasks for backend developers then it will create a new task backend publish task
I construct the following rule but its not working
Hi @Umar Maroof ,
if you have JMWE, you can add a Create Issue(s) post function to your Epic transition (in the workflow editor), configure it to create the "Backend publishes task" (it should be fairly straightforward), check the "Run this post-function only if a condition is verified" option at the bottom of the screen and provide a "condition" like this:
{{ issue | stories("issuetype") | filter(["fields.issuetype.name","Tasks for backend developers"]) | length > 0}}
Let me know if you need more help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note that the issue type name is case-sensitive. Can you check the exact issue type name of the issue that should be under the Epic being transitioned for the new issue to be created?
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.
@David Fischer this is the name of the tasks if this task is present under epic and epic transit to one status to another status the new issue should create...if I remove the condition its creating the issue but with condition nothing happening
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Umar Maroof I just tested it and it works just fine for me. So just to be sure:
If so, can you go to the Nunjucks and Jira Expression Tester page and "test" this expression against the Epic selected above?
{{ issue | stories("issuetype") | dump(2) }}
and post the result here?
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.
@David Fischer without putting the condition its works fine when i trigger the transition the new issue is created
but with condition I want to create a new issue when the issue tasks for backend developers are present under epic but nothing happening.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you follow my previous ask?
Also, if you don't see anything in the JMWE logs, it means JMWE is not doing anything, so I don't see how it could create a new issue. Are you sure it's not another automation that's creating the new issue?
Can you share your JMWE Create Issue(s) post function ID, as it appears on the configuration page?
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.
If you click on "1 error", it'll take you to the JMWE Logs page and filter logs for that specific post function. Then modify the "Level" filter to "INFO" to "FATAL" and you'll see the post function executions and the "Condition returned false. Skipping execution" message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Fischer when I run the flollowing expression in Nunjucks tester it return as false.
{{ issue | stories("issuetype") | filter(["fields.issuetype.name","Tasks for backend developers"]) | length > 0}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Again, can you please run this in the tester:
{{ issue | stories("issuetype") | dump(2) }}
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.
Thanks. That confirms my assumption: there is a trailing space in the Issue Type name:
"Tasks for backend developers "
So you have two options:
{{ issue | stories("issuetype") | filter(["fields.issuetype.name","Tasks for backend developers "]) | length > 0}}
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.
@David Fischer 1 More thing like I want the newly created issue will be the child of that epic so when I set the field epic link as copy of current issue its not copying the epic link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to set the Epic Link field to "Set to other field of current issue:" and select the "Key" 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Umar Maroof
The rule doesn't work because you are looking for a parent for the epic which does not exist. So that's why is empty.
You can try creating a branch to go under the tickets in the epic (https://support.atlassian.com/cloud-automation/docs/what-is-rule-branching/)
Then use a JQL condition to check whether the specific ticket type and summary exists, if it does, then you can create a new variable action that tells you that the ticket exists.
Branch out of the rule and then transition the epic and create a new task and link it.
If you have the budget, I would spend the money on JMWE or JSU which have workflow functions pre-built for this. This action for Jira Automation becomes very messy.
Regards
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.
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.