Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rule to copy over field from one child issue to another under the same epic.

Luis Dominguez March 6, 2023

I am trying to write out a rule that will copy a field from one child issue to another.

 

All the issues are tied to the same epic. For example, two stories are tied to the same epic, however, I want the user to be able to enter in a field inside a story certain information, so that the user can see the same information in the same field inside another story. This will help avoid manual work and typing the same information from one story to another tied to the same epic. Rollout Instructions Rule for Jira.png

1 answer

0 votes
Trudy Claspill
Community Champion
March 6, 2023

Hello @Luis Dominguez 

Do you want the text copied to all of the other child issues of the Epic, or only certain child issues of the Epic?

Instead of using an IF, use a Condition.

Follow that with a Branch/Related Issues/JQL to search for the sibling issues you want.

Then have an action to copy the value into those found issue from the Trigger Issue.

In my example I used the Description field. Substitute in the field that is important to you.

Screen Shot 2023-03-06 at 3.45.40 PM.png

Luis Dominguez March 7, 2023

Hi Trudy it did not work. There is a field (called Field XYZ) that I created for two specific child issues called Issue A and Issue B.

 

Issue A and Issue B are tied to the same Epic. I want the rule to work like this: 

If a user types in Issue A certain notes in field XYZ, then those notes will carry over to Issue B in field XYZ.

Trudy Claspill
Community Champion
March 7, 2023

Please show us your modified rule and the audit log from the execution of that rule where you didn't get the results you expected.

Like Luis Dominguez likes this
Luis Dominguez March 7, 2023

Rollout Instructions Rule Part 2 For Jira.png

Luis Dominguez March 7, 2023

Above I put in a screenshot of the rule. 

Trudy Claspill
Community Champion
March 7, 2023

That rule does not look at all like the rule example I provided.

It appears to have no relation to your post, which is asking about automation to copy a field value from one child issue to another. The rule image you posted appears to be trying to change the Status of an issue, not copy a field value.

Like Luis Dominguez likes this
Luis Dominguez March 8, 2023

I have attached the correct screenshot. Still having issues. 

Luis Dominguez March 8, 2023

Rollout Instructions Rule Part 2 For Jira.png

Luis Dominguez March 8, 2023

Still having issues. Here is the screenshot with the log entries. 

Trudy Claspill
Community Champion
March 8, 2023

Hello @Luis Dominguez 

Thank you for that image.

It appears to me that in your JQL statement you have inserted a period between "Epic" and "Link" in the smart value.

{{triggerIssue.Epic.Link}}

That needs to be a space rather than a period.

{{triggerIssue.Epic Link}}

That is the field name for the Epic Link field. When you insert a period, the smart value interpreter is reading that as "find the Epic field and look for the Link attribute". Instead it needs to be "find the Epic Link field".

Like Luis Dominguez likes this
Luis Dominguez March 8, 2023

Rollout Instructions part 3 jira.png

Luis Dominguez March 8, 2023

the rule still does not work. The comments I made in the rollout instructions field still are not carrying over in the other child issue. 

Trudy Claspill
Community Champion
March 9, 2023

Looking at the Audit Log screen you posted, it shows that you made a change to the Rule at 11:53:34 and since then the rule had not been triggered.

Is the rule enabled?

Have you made a change to the "Rollout Instructions" field in an issue in the Project this rule runs against? That type of change is required to trigger the rule to run. There may be a slight delay between you updating an issue and the rule being triggered. Did you refresh the Audit Log screen to show any new log entries?

Luis Dominguez March 13, 2023

ss to jira on 3-13-23.png

Luis Dominguez March 13, 2023

In screenshot attached above, I updated the rule and test it out again. The rule is not working. 

 

Looking at the Audit Log screen you posted, it shows that you made a change to the Rule at 11:53:34 and since then the rule had not been triggered.

Is the rule enabled? Yes it is enable. 

Have you made a change to the "Rollout Instructions" field in an issue in the Project this rule runs against? Yes, I wrote the "Rollout Instructions" in the "Testing In Production" Issue and it did not appear  on the "Rollout".

 

That type of change is required to trigger the rule to run. There may be a slight delay between you updating an issue and the rule being triggered. Did you refresh the Audit Log screen to show any new log entries? Yes I refreshed the audit and nothing came up. See above. 

Trudy Claspill
Community Champion
March 13, 2023

I am noticing a few differences between the example rule I provided and the rule you constructed. You used an IF/Else condition rather than a simple Issue Fields condition for the second step.

I also see that you show us different rules each time. You showed us FSD Link Additional Transition, and then you showed us Rollout Ins-Rule to Copy. Two different rules with different logic and different audit logs. Please let's stick to just fixing one rule at a time.

So, let's go back to basics.

It appears that the rule is not being triggered, so let's start with confirming the trigger is defined correctly

Create a very simple rule 

TRIGGER: Field Value Changed

- Select your field and show us a screen image of the settings you set for the Trigger.

ACTION: Log

- Use the Log action to log a message to the rule's Audit Log. The message can be anything.

Tell us the Scope you have set for the rule. That will be on the Rule Details page.

Pick an issue that is within the project against which this rule is set to run. Show us an image of the field in that issue before you change it and then another image after you change it.

Show us the audit log for this simple rule.

 

What we want to verify with this is that you are making a change in an issue that is within the scope of the rule, and that the change you make matches the conditions of the trigger.

The Log action is a great method for debugging rules. You can print message and smart values into the Audit Log to help you determine which steps are getting executed.

 

After verifying that the Trigger is correctly configured and you are executing an action that will actually trigger the rule, then we can add the next rule step (Issue Fields Condition) and verify it is configured and working correctly. Build up the rule one step at a time, verifying each step with tests.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events