You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have 2 projects that I need to copy information between. I need to know how to copy information from a custom field in an issue (project 1) to the comment field in another issue (project 2).
Any assistance with which automation rule to use and the associated JSON needed would be greatly appreciated.
How are the two issues related? Are they linked together? Is there a custom field in the source issue that holds the issue key for the other issue?
When do you want that update to occur? Should a comment be added every time the custom field changes?
This can likely be accomplished through an Automation Rule, depending on how you can identify from the Project 1 issue the Project 2 issue that needs to be updated.. The rule would have to be set up as a Global Automation rule since it involves issues in multiple projects.
Thank you @Trudy Claspill
In project 1 I have an automation rule set up to create a similar issue in project 2. The automation rule copies those fields that are the same in both projects, but project 2 doesn't have all the fields set up, nor does the owner of the project want them set up. So instead I would like to copy the unique fields from project 1 into the comment field of project 2. The automation rule I have set up to create the project 2 issue is triggered manually from Actions. There are no problems in creating the project 2 issue.
I want the update to occur 1 time only. It can be a manual trigger, though I would prefer the first automation rule to trigger this second automation rule.
The custom fields in project 1 should not be changing, so no further updates would be needed beyond the initial update.
The only problem that I am having is getting the custom fields to copy its contents into the comment field in project 2. Labeling the comment field, such as Label: comment, would be ideal.
The rule needs to be able to identify the source issue and the destination issue.
Somehow you have to record a relationship between the two issues that can be leveraged by the rule.
If you use a manually triggered rule that a user triggers from the source instance, then you could prompt the user to enter the issue key of the destination instance.
Alternately, you could create a link between the source and destination issues, and a rule can find the destination issue based on that link.
If you want the first rule to trigger the second rule, then you could use the Issue Created trigger to detect the creation of the destination issue. You still need some way for the rule to identify the source issue in that case.
Because the rule is interacting with issues from two different projects it will need to be a Global automation rule. You will need to identify the source and destination projects within the rule scope.
To add a comment you will need to use the Comment on Issue action.
The exact smart values for getting the information from the source issue will depend on how the rule is triggered and how the other issue in the pair is identified for the rule.
In addition to what @Trudy Claspill stated, you need to determine what is the triggering event in Project 1 that will update Project 2 content (i.e. copying the custom field value in Project 1's issue to Project 2 issue as a comment). The main key you need to also know is how are Project 1's issue is related to Project 2's issue?
Only the above two main elements are identified, then you can establish the necessary global automation rule(s) to perform the actions between Project 1 and 2.
Hope this also helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Thank you @Joseph Chung Yin
The triggering event is an automation rule that is triggered manually from Actions.
The only correlation between the 2 projects is that project 1 will create the issue in project 2 when the manual rule is triggered.
I am good with either of these scenarios:
1. The same automation rule that creates the issue in project 2 will also copy custom fields from project 1 into the comment field(s) of project 2.
2. A separate automation rule is ran that will copy the custom fields from project 1 into the comment field(s) of project 2.
I just can't seem to come up with the JSON necessary to copy those custom fields from project 1 over to the comment field in project 2.