Forums

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

Copy custom field value from SQL item search (foreach branch) to current work item

Céline - Maestrel
Contributor
July 9, 2025

Hello,

I have a question that is probably simple, but I can not figure it out and would appreciate the help of the Atlassian community. 

It is on a JSM project.

When a work item is created:

  • browse if there are existing work item from same reporter (OK)
  • go through all existing work item from this reporter (foreach branch) and check if a specific custom field is not empty (OK)
  • copy the value of this custom field (from the work item of the foreach) to the work item that triggered the rule 

The last part is where I struggle.

  • I have tested with "Edit work item", but it edits the work item of the foreach branch.
  • I have tested with "Set issue property" (but it the property is associated to the work item browsed in the foreach branch, not to the work item that triggered the automation).

It seems to me that it should be rather simple, and that I am missing something... 

With many thanks!

Céline

2 answers

0 votes
Trudy Claspill
Community Champion
July 9, 2025

Hello @Céline - Maestrel 

I have a questions about this step:

  • copy the value of this custom field (from the work item of the foreach) to the work item that triggered the rule 

1. What type of field is the custom field?

2. Is the field into which you want to copy the data the same field in the trigger issue? Are trying to copy from field "A" in the found issue to field "A" in the trigger issue?

3. If the answer to #2 is "no" then what is the field type of the trigger issue field into which you are trying to copy the data?

4. What do you require the end result to be when you have found multiple issues where the custom field is not empty? Do you expect all the various values of those fields to be copied into the one destination field in the trigger issue?

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2025

HI @Céline - Maestrel 

Whenever you ask for help with an Automation Rule it will help us to help you if you provide:

1. what type of project is this (e.g., company-managed, team-managed, etc.), 

2. images that show your complete rule.

3. images showing the details of any relevant actions/conditions/branches.

4. images showing the Audit Log details for the rule execution.

5. Explain where the issue is.

These questions are not for not willing to help, but to have community members understand on how automation works.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events