Forums

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

Sync releases between two project instance

Garret Zhang
Contributor
March 17, 2023

Hi, I have a question on if it is possible to sync between the releases from two JIRA project instance with "version update" automation

Example:

Project A fix version - 1, 2, 3, 4

Project B fix version - 1, 2, 3, 4

If I change project B fix version to 1, 2, 3, 5

I want to see project A fix version to 1, 2, 3, 5

Thanks,

Garret

3 answers

1 vote
Syed Majid Hassan -Exalate-
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.
March 26, 2023

I believe there should be two efficient methods to achieve this:

  1. Jira automation - a very viable solution and has been discussed at length above. 
  2. Issue sync solution - you can use an app like Exalate to achieve this either in 2 projects on the same Jira (your use case) or 2 projects in 2 different Jira instances. 

Hope you get it working.

Thanks

Majid

1 vote
Oday Rafeh
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.
March 17, 2023

Hi @Garret Zhang 

You can use Jira's built-in automation to sync the fix versions between two projects. Here's how to set up an automation rule to achieve this:

  • Go to your Jira instance and click on the gear icon (Settings) in the top-right corner.
  • Click on "System" in the left sidebar, then click on "Automation rules" under the "Automation" section.
  • Click on "Create rule" to start a new automation rule.
  • Select the "Scheduled" trigger to run the rule periodically (e. g. , every hour) to check for changes in fix versions.
  • Add a "Lookup issues" action to find all issues in Project B that have a different fix version compared to their counterparts in Project A. You can use a JQL query like this:

 

project = "Project B" AND fixVersion ! = "1, 2, 3, 4"
  • Add a "For each" action to loop through each issue found by the "Lookup issues" action.
  • Within the "For each" action, add an "Edit issue" action to update the fix version in Project A with the new fix version from Project B. You can use the "Fields" section in the "Edit issue" action to specify which fields to update.
  • Save and enable the automation rule.

This automation rule will periodically check for changes in fix versions in Project B and update the corresponding issues in Project A. Please note that this approach may not be real-time and will depend on the frequency of the "Scheduled" trigger.

Hope this helps you 

Garret Zhang
Contributor
March 17, 2023

Hi Oday,

Thank you for the response. I didn't explain this right, what I am looking for is to sync the releases between two projects, showing below:

Capture.PNG

Our project's release mirror the other project's release, I want to make sure if they were to make a change of the release in their project, it also reflect in our project.

Thanks,

Garret

Oday Rafeh
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.
March 17, 2023

Hi @Garret Zhang ,

It's Okay, I defined the steps you want to do: 

To sync releases (versions) between two projects, you can set up an automation rule :

  • Go to your Jira instance and click on the gear icon (Settings) in the top-right corner.
  • Click on "System" in the left sidebar, then click on "Automation rules" under the "Automation" section.
  • Click on "Create rule" to start a new automation rule.
  • Select the "Webhook" trigger to listen for changes in project versions. (Note: You'll need to configure a webhook in the source project's settings to send events to this automation rule. More details on creating webhooks can be found here. )
  • Add a "Condition" to check if the received webhook event is related to a version change in the source project (Project B). For example, you can use the "Advanced compare condition" to check if the event payload contains the desired project key.
  • Add a "Branch rule / Related issues" action to find the corresponding version in the target project (Project A) based on the received webhook event.
  • Add an "Edit version" action within the branch rule to update the version details in the target project (Project A) with the new details from the source project (Project B). Use the "Fields" section in the "Edit version" action to specify which fields to update.
  • Save and enable the automation rule.


This automation rule will listen for version changes in the source project (Project B) and update the corresponding versions in the target project (Project A) accordingly. Please note that you'll need to configure a webhook in the source project's settings to send events to this automation rule.

Hops this going to help now :) 

Garret Zhang
Contributor
March 17, 2023

Hi Oday,

This sounds like exactly what I need to do, I'll do some more diggings on Monday. Much appreciated it!

Thanks,

Garret

Like Oday Rafeh likes this
Oday Rafeh
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.
March 18, 2023

Hi @Garret Zhang  Nice to hear that please update me here with the results or any other questions :) 

Garret Zhang
Contributor
March 20, 2023

Hi @Oday Rafeh

I am currently working on this and have few questions.

To setup the source webhook, I went to "webhook" in system setting. From there I created a webhook listener, is that the source of the webhook? I assume the listener is looking for any events related to version updates from the entire JIRA website? If this is not right, could you let me know how to setup the source webhook? I also don't see any webhook in project setting. Please provide guideline here.

Capture.PNG

 

Assuming the listener I set previous is right, now I am setting up the automation piece to pick up the incoming webhook. I am setting this automation as global automation.

1. My trigger is incoming webhook. (I take the URL from the trigger and paste it to the webhook in the source webhook, is that right?), please provide guideline here.

2. Follow by if project key = NPE.

3. Then brunch for.... (I only see issue fixed in version, isn't this is only for issues update, not fix version in projects?), please provide guideline here.

4. Then I setup new action to edit fix version.... (In here I also only see edit issue, not edit fix version in project), please provide guideline here as well.

 Capture.PNG I think I am close, and I appreciate the support!

Oday Rafeh
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.
March 21, 2023

Hi @Garret Zhang , 

you are on the right track! 

To set up the source webhook:

Go to the project settings of the source project (Project B) and click on "Webhooks" in the left-hand menu.

Click on "Create a webhook" and choose the events you want to trigger the webhook (in this case, version changes).

Copy the webhook URL provided and use it as the trigger in your automation rule.

Now, moving on to your automation rule:

In the trigger section, select "Webhook" and paste the webhook URL from the source project.

For the condition, set it to "Issue fields condition" and select "Project key" as the field. Set the value to "NPE" to ensure that the rule only applies to changes in that project.

For the branch rule, use the "Related issues" action and select "Project A" as the project. Specify the version name from the webhook payload to find the corresponding version in Project A.

To edit the fixed version in Project A, use the "Edit issue" action. Set the project to Project A, and use the "Advanced issue search" option to find the issue(s) that correspond to the updated version from Project B.

In the "Edit issue" action, set the "Fix version/s" field to the updated version(s) from Project B.

Garret Zhang
Contributor
March 23, 2023

Hi @Oday Rafeh

Thank you for the response, I finally got time to come back to this. I am very close and got stuck on the very last part:

 

"To edit the fixed version in Project A, use the "Edit issue" action. Set the project to Project A"

Could you help me verify setting Project to OIM is correct? (OIM is the target project where fix version will need to be updated) Source project is NPE.

Capture.PNG

 

"use the "Advanced issue search" option to find the issue(s) that correspond to the updated version from Project B."

I am unsure on what to write in the "Advanced issue search" section. 

Capture.PNG

 

"In the "Edit issue" action, set the "Fix version/s" field to the updated version(s) from Project B."

could you also verify if this is right? (Issues - from NPE project - look up fix version - name)

Capture.PNG

Thanks again!

0 votes
Jonathan
Contributor
January 22, 2024

Why do you use a webhook instead of using the built-in "version changed" trigger, as described here: https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Automation-Create-a-version-in-another-project/qaq-p/1451018?anon_like=1452317

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events