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

Automation from a service desk issue to a linked issue

Linda Korpås May 10, 2023

I have tried to find the answer here in the community and tested some automations but I don't get it to work. 

I have created a service desk project where request can be created using the portal but where the issue will be managed in a sw project.  I have managed to create an automation for a linked issue to be created in the sw project. So far so good. But now I would like the two issues to share some information and here is where it stops for me. 

1 - Update status: I would like the status of the original issue created in the service desk project to be updated when the status is updated for the issue in the sw project. I have tried but not succeeded. I have set up rules in the service desk automation using the Legacy automation section but this is probably incorrect since I don't get it to work. See picture of my attempt. I have also tried to set it up using the "normal" automation but haven't succeeded. All automation attempts have been performed in the settings for the new service desk project. 

 

Screenshot 2023-05-10 at 14.51.48.png

2 - Share comments - I also would like to have any comments added to the issue in the portal to be copied to the linked issue in the sw project and vice versa. Can anyone share how this is done?

 

Feeling hopeful!

Thanks in advance :) 

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2023

Hello @Linda Korpås 

It is possible to synchronize the statuses with the "normal" Automation Rules feature.

Because you will be looking for changes to issues in the software project and wanting to update issues in the service project the rule will need to be a Global rule. The Scope of Projects for the rule will need to be set to include both the software and the service project.

Note there are limits on free Global Rules. Standard Jira subscriptions are permitted only 500 Global/multi-project rule executions per month for free.

 

Start with a Trigger of Issue Transitioned.

Follow that with a Condition that the trigger issue is in the software project, since you want this to be a one-way update.

Screen Shot 2023-05-10 at 4.32.06 PM.png

 

Next add a For Branch / Related Issues / Linked issue step. Do you have a unique link type that you are using between the software and service issues? It would make things easier if they do because then you can select the link type and know you will affect only the linked Service issues.

Screen Shot 2023-05-10 at 4.34.33 PM.png

 

If you don't use a unique link type between the software and service issues, then the next thing you want to add is Condition(s) to select only the Service issues you want to affect.

Screen Shot 2023-05-10 at 4.36.10 PM.png

 

Do you use identical issue Status values for issues in these two projects? Do you use identical workflows? 

The next step would be to add a steps to transition the Service issue. However, the exact steps could be complicated by the answers to the above two questions. If you use the same status values you can use the Transition Issue action and use the option to Copy from Trigger Issue.

Screen Shot 2023-05-10 at 4.38.57 PM.png

If you don't use identical Status values then you may want to create separate rules where you specify in the Trigger the status to which the Software issue is being set. Then is this step of copying from the Trigger issue you would select the specific Status value for the Service issue that is "equivalent" to the status of the Software issue. Creating separate rules would allow you to keep each rule simple versus trying to code if/else steps to cover the different combinations.

Another thing to consider is if the Service issue will be in a status that will allow a transition to the desired status, the Transition doesn't have a Transition Screen, and the Transition doesn't have any Conditions or Validators that might prevent the transition from completing.

 

---

 

For copying comments you would do a similar rule.

The Trigger would be Issue Commented

Instead of the Transition Issue action you would use a Comment On Issue action.

Screen Shot 2023-05-10 at 4.44.14 PM.png

You can use smart values to get the details of the Comment that triggered the issue and insert those smart values in the Comment field of this action. You can see examples of the attributes that can be used with the Comment object here. So, for instance, if you wanted to copy the body you would use {{comment.body}}

You would want two rules for comments; one that would use the conditions shown above to copy comments from the Software issues to the Service issues, and one where the conditions are swapped to copy comments from the Service issues to the Software issues.

Linda Korpås May 15, 2023

Thank you @Trudy Claspill 

I am trying to follow the above instructions. I am not sure though what to do when I don't have a unique link type between the software and service issues. 

Should I still have the Branch rule/related issues like the below or should this be skipped or should I do any other choice in this section? 

Screenshot 2023-05-15 at 15.25.00.png.                                  If it is easier and better to use the unique link type then I can of course also add this if it isn't too difficult.  Is this something that is configured on the software project side? 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2023

What link type do you use to link these software and service issues to each other? Do you use more than one type of link to linking software and service issues together? 

If a software and a service issue are linked together do you always want to update the status regardless of the link type?

If you always want to update the status regardless of the link type between the software and service issues, then in the For Branch select all the types of links you use to link software and service issues to each other.

If you don't have a unique link type that you use only between the software and service issues, then also add the condition I mentioned as the first sub-step in the For Branch to ensure you update only the linked issues that are in the service project.

If there are situations where there are links between the software and service project issue when you don't what to update the status of the service issues, you'll have to figure out what the conditions of those situations are so that you can include them in your rule.

Linda Korpås May 16, 2023

@Trudy Claspill  - So i discovered that I had probably only created an automation that made a copy issue in the sw project and not a linked issue. The first picture shows what I previously had done and now I have made som changes and added the And Link issue to. and I used the Link type "Causes" (like the third picture shows)

Screenshot 2023-05-16 at 15.24.16.pngScreenshot 2023-05-16 at 15.46.34.pngScreenshot 2023-05-16 at 15.49.22.png

So now I will get back your instructions above and see if I can get it to work.  :) 

 

Thanks!

Like Trudy Claspill likes this
Linda Korpås May 17, 2023

@Trudy Claspill  I get the automation to work now :) Super thanks for your help!

 

I don't get the comment-automation to work though. I have tried different configurations but no... I want the comment in the sw project (MSI) to be visible in the service project (IM) and vice versa. ( I understand I need to do two separate rules for this)

I am stuck on the last part on what to write/add in the Comment field in the "comment on issue" action.  As seen on the right side in the picture below. I have tried some options but haven't worked.

Screenshot 2023-05-17 at 15.56.47.png

 

Not sure though if something else is incorrect with the rule. As you can see I have used "Rule is triggered on - Comment is the main action". Is this correct?

I have also tested with both Causes and Caused by as ink types in the Branch. 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

From your previous comment image you changed your rule creating the copy issue so that: 

  • When issue is created in IM
  • Then create an issue in MSI
  • And create a link that IM issue causes MSI issue.

In your new rule where you are trying to copy comments the rule reads as:

  • When a comment is the main action
    • and the comment was added to an issue in the MSI project
  • For each linked issue where MSI issues causes the linked issue
    • and the linked issue is in the IM project
    • then add a comment to the linked issue (in the IM project)

In your For Linked Issues step the Type should be caused by.

For copying the comment, what elements of the comment do you want copied? This documentation shows the attributes you can get from the Comment that triggered the issue. You can insert those smart values into the Comment field in the Add Comment To action to copy the information from the trigger Comment to the new comment that you are adding.

If those changes don't get you the result you expect, please provide a copy of the rule Audit Log output for an execution of the rule with your next response.

Linda Korpås May 23, 2023

@Trudy Claspill  It all works fine now. Thank you so very much for your support! 

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events