Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automate Issue Creation from one JIRA instance to another JIRA instance

This is mostly configured when you're using a JIRA Server instance, but you can also do it with JIRA Cloud.

Configure locally two instances (one JIRA Software and other JIRA Service Desk) in order to configure rules to work with this.

It was possible to do that by configuring rules on Automation for JIRA on both instances. So these are the requirements for this to work:

  • Automation for JIRA must be installed on both instances, the one which is sending the webhook with the JIRA issue that was created and the one which is receiving the webhook with the JIRA issue.
  • You must have created the project on JIRA Software instance in order to receive the issues created dynamically.
  • You'll need to create two rules, one rule into the "sending webhook" instance and other rule into the "receiving webhook" instance.

Let me jump into the rules I've configured in order to make it work:

Rule for JIRA Service Desk instance:

image.png

 

This rule will be responsible for sending the webhook onto the JIRA Software instance. Follow the description of each field on "Send web request" action:

  • Webhook URL: This URL is retrieved when creating the rule on JIRA Software instance. Please check on the description under the "Rule for JIRA Software instance" section.
  • Headers (optional): You must insert the same headers as on the screenshot ("Content-Type" and "application/json") in order for this to work correctly.
  • HTTP method: It is POST because you're sending information towards the webhook URL.
  • Webhook body: Select "Issue data" just to make things simpler and so you'll be sending all the issue data.

 

Rule for JIRA Software instance:
Screenshot 1:
image.png

Screenshot 2:
image.png

This rule will be responsible for receiving the webhook from the JIRA Service Desk instance. Follow the description of each field on both Screenshot 1 and Screenshot 2.

Fields on Screenshot 1:
  • Webhook URL: This is the URL that we'll need to use on the "Webhook URL" field of the previous rule in order to direct the data towards this application. Copy and paste it carefully on the first rule.
  • Execute this automation rule with:: Select "Issues provided by webhook HTTP POST body" as we are sending the issues directly through the POST body;
Fields on Screenshot 2:
  • Project: Here you'll need to select the project under your JIRA Software instance that must receive all the issues that will be created from the JIRA Service Desk issues;
  • Issue Type: Here you must select the issue type that the issue will be created on. In case you need to create issues from different issue types, it is possible to add some conditions with "If block condition" and make separate "Create Issue" actions for each of the issue types.
  • Summary and Description: Here we must use a "Smart value" that works as a way of retrieving data that came from the "Webhook data". The logic for this specific scenario is that the "webhookData" object contains the "fields" object in which all the fields are inside. So, for the summary I've used {{webhookData.fields.summary}} and for the description I've used {{webhookData.fields.description}}. You'll need to add all the fields you want under the "Choose fields to set" option and then use the same logic to get the field values from the webhookData object.

Tips for implementation:

  • In order to gather the Webhook URL, start both rules creation at the same time, so you can easily copy and paste the value;
  • Start implementing this with only summary and description fields and then you can improve by searching for the fields one-by-one;
  • I've added a "Log action" action on the rule for JIRA Software instance in order to understand what was inside of the "webhookData" smart value, so I was able of figuring out the pattern that we need to follow to retrieve the fields as we wanted.

6 comments

Taranjeet Singh Community Leader Jul 30, 2020

@Victor Seger  Thanks for sharing this nice automation tip.

@Victor Seger 

Thanks for sharing, this helped me a lot!  I have a question about linking between Jira Cloud instances.

When a manager requests an Onboard, Offboard or Transfer in our HR Instance, I have a rule that creates an IT Task in the HR instance.  A web hook posts the IT Task details to our IT Instance and creates a new request (Request Type=HR Request).  How do I link the IT Task in HR to the HR Request in IT?

Once linked, I also need to update the IT Task in HR to Resolved when the HR Request in IT is Resolved.

Any guidance you can provide would be greatly appreciated!

Thank you!

Carla

@Victor Seger  Automation is just what we need, Thanks. But we have a problem with Incoming Webhook. The audit log says "No issues from the webhook". Can you help with that?

Victor Seger Atlassian Team Jan 07, 2021

@cfranke @Salome Khaindrava , We can help you both on that.

Can you please open a ticket on support.atlassian.com? 

By opening a ticket we can give you a closer support experience and try to help you properly.

@Victor Seger I did open a ticket, they helped with workarounds, but we could not get status updates to transfer back to the original system though I was told that a solution would be deployed by the end of 2020, but I do not know if that has happened or not.

@Victor Seger  Thanks, we figured it out. We had to choose the "No issues from the webhook" option for it to work. We will continue research and then open a ticket if it will be necessary.

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you