Automation possibility between JSM and JWM
Asked by Abhishek Shukla:

Hello everyone,

I am a new Jira user and I was wondering if there is a possibility where when a new query is logged in the Jira Service Management then it gets cloned automatically into a project in Jira Work Management and any changes made in the query status or description is automatically reflected in the cloned task created in JWM?

I did create automation that cloned the query from JSM to JWM but after that, any update that I made in the JSM query was not visible in JWM.

Thanks in advance!


Answers:
author: John Funk
body: Hi Abhishek - Welcome to the Atlassian Community!

Yes, that is very easy to do with an Automation Rule. Create a rule based on an Issue Created trigger for the JSM project. Then add any conditions you need so that it only executes for the appropriate JWM project.

Then add a new action for Clone Issue. Change the project to your JWM project and any other information that needs to be added or is different from the original request.

Then add a new Action to Link Issue.

After that, same and publish the rule.

You will need to create a second rule that keeps the Linked issues in sync.

comments: author: Abhishek Shukla
body: Hi John,

Thanks for the answer ?

I was able to execute the first part of your answer but could not figure out how to execute the following while creating the automation rule -

*Then add a new action for Clone Issue. Change the project to your JWM project and any other information that needs to be added or is different from the original request.* *Then add a new Action to the Link Issue.*

Could you please guide me on how I can execute the remaining part of the automation rule that you mentioned in your answer?

Thanks in advance!

![download.png](https://community.atlassian.com/t5/image/serverpage/image-id/244225iE8C71DA668F4594E/image-size/large?v=v2&px=999 "download.png")


author: John Funk
body: It will look something like this:

![Screenshot.png](https://community.atlassian.com/t5/image/serverpage/image-id/244226iDB44D361DDEC24C7/image-dimensions/257x401?v=v2 "Screenshot.png")


author: Abhishek Shukla
body: Thanks again John, finally it links the two issues across JSM and JWM.

One last question - I made a comment on a query in JSM and changed its status to "**In Progress**" but this change is not reflected in JWM, therefore, I just wanted to ask you if it is possible to have automatic sync between these two issues or am I looking for too much in this case?

Thanks in advance!![download.png](https://community.atlassian.com/t5/image/serverpage/image-id/244229i960E954AB1AF00C7/image-size/large?v=v2&px=999 "download.png")


author: John Funk
body: Can you post the rule that you created that copies the comment from one project to the other?


author: Abhishek Shukla
body: I am unable to create a rule that could achieve this, have tried multiple hit and trial combinations but sadly none of them are giving the desired results.


author: John Funk
body: Please share what you have so far so we can help you with the corrections.


author: Abhishek Shukla
body: ![download.png](https://community.atlassian.com/t5/image/serverpage/image-id/244447i503A511354FCCE5A/image-size/large?v=v2&px=999 "download.png")


author: John Funk
body: No, that's just to create the issue and then link them.

You need a totally different rule for when a comment is added. Create a new rule with the Issue Commented trigger.

Then add a Branch for Linked Issues. Choose the Link type if you have different ones for the JSM/JWM connections.

Then add a new Action for Comment on Issue.

In the Comment box, put {{triggerIssue.comments.last.body}}

You can read more about smart values with comments here:

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>


author: Abhishek Shukla
body: Hi John, based on your comment I created the following rule in the JSM project from where I want queries to get cloned to the JWM project.

<https://imgur.com/DGqRlRX>

New queries logged in JSM are getting cloned in JWM but sync is still not working and in audit log of the rule the following message is displayed -

<https://imgur.com/llS0WSw>

Am I missing something here or do I also need to create some rule in the JWM project where the JSM query is getting cloned?

<https://cutt.ly/A8HXz79>

Thanks again for all the input ?


author: John Funk
body: Uncheck the box for Only include issues that have changed.


author: Abhishek Shukla
body: Hi John,

I unchecked the box but in the audit log it still shows the same message (<https://imgur.com/llS0WSw>) - No action performed.

I am now starting to believe that maybe there isn't any workaround possible.


author: John Funk
body: What exactly is the action that you are doing? And what is it that you are expecting to happen?


author: Abhishek Shukla
body: Hi John,

I finally got it working, I just had to move the automation rule to the global level in order to achieve the desired result. Thanks for the help!


author: Kelley R
body: Hi All, I'm working on a similar automation, but stuck on getting status to mirror across products using different workflows. Any thoughts?


Tags: jira-work-management

new-to-jsm