I created an intake form that captures data from clients and copies it into our intake project screen for evaluation. Once evaluated, then our team makes a decision, and can create a new project in one of three different spaces in JIRA, based upon the service line. When they select one of the three choices, the intake space task closes and a new task in one of the new spaces is created. The two Tasks are linked together through Linked Work Items. When this transition happens, I want to copy some of the fields from the Intake Space Fields to the New Space Fields with the same name.
I have created a JIRA automation for this and have not been successful in making it trigger. Any suggestions
You describe copying some fields from the linked work item to the newly created one (which triggers the rule shown).
First, how is the work item created which you want to trigger the rule shown?
If another rule is creating the work item, please note rules will not automatically trigger in this case. This is done to prevent accidental rule looping. When you want the actions of one rule (e.g., the create) to trigger other rules (e.g., the rule you show), you must enable this option in the downstream / second rule:
Check to allow other rule actions to trigger this rule...
Next, the rule you show cannot directly access the linked work item to copy the fields. Please use the Lookup Work Item Data action with JQL to load that one, and then copy the data from there.
Finally, if you do have a separate rule to create the work item and then want to copy the fields, please consider doing both of those things in a single rule. That will reduce the chance of errors copying the information and / or the rule not triggering when expected.
Kind regards,
Bill
Thanks Bill.
First, how is the work item created which you want to trigger the rule shown?
The work item is created by a post function, that is more advanced than my understanding. I was hoping to leave that code intact as I don't quite understand how it works and it creates a unique case ID that our team relies upon. I will dig in and see if I can either add to it or convert it to JIRA automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your rule is not triggering, or the trigger conditions are not met, that could be due to a racetrack timing problem happening with the trigger. (This often happens with this trigger.)
The way to check for that is to remove the condition from the trigger, and add a separate condition to check the issue type, adding a re-fetch work item action immediately after the trigger to ensure the data reloads before the rule continues. For example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update - I updated the rule using post function and it works perfectly now.
Thanks Bill.
However I am worried about this script that runs on the newly created work item. I will add all the fields and see if timing becomes a significant issue.
This is the case creation code that runs after the intake is closed that I am concerned about. It is already very slow and sometimes requires the user to refresh after 20-30 seconds as it does not immediately populate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jessica,
Is there another rule that fires to create the initial Work Item? Or is it created directly from the form?
If directly, I suspect the rule is firing but is either not passing the conditions or is trying to update itself.
First, add a Re-fetch action right after the trigger to ensure the fields are getting set properly.
Then add a Branch based on Linked work items. Move your Conditions and Edit work item action under the branch.
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.
Thank you so much - I ended up solving it another way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jessica Schmor , you mention that you can't get the rule to trigger? Is that indeed the case or is it that it does trigger but the fields are not updated? If it does trigger what does the audit log indicate?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suspect it is triggering as it is a simple trigger "when the work item is created".
The logs say no action performed.
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.