Notification when there is a status change (linked issue project)
Asked by Bar?? ?zer:

Hello,

We made an automation as follows. [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) thanks thanks \<3

![image.png](/t5/image/serverpage/image-id/316708i492C57A7C63DF65D/image-size/large?v=v2&px=999 "image.png")

I would like to add the following rule to this automation.

**[@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)**

**Can we write a rule regarding "status" changes in the automation you showed me?**

**((Can we notify the Service Desk when the "status" changes in the INF Project?**

**Example:**

**In INF Project status = Backlog and**   
**After a few days, when status = In Progress, will the Service Desk receive an update regarding the status change?))**


Answers:
author: Trudy Claspill
body: Hello [@Bar?? ?zer](/t5/user/viewprofilepage/user-id/4828228)

What do mean exactly by "notify"?

Do you want a comment added to the linked SD issue that says the status on the INF issue changed?

Rules are triggered by events. The other rule is triggered by a Comment being added. You can't add a second trigger to that rule to take an action based on a different event.

There is a Issue Transitioned trigger that you can use to trigger a rule when the status of the INF issue changes. That will have to be a separate rule from the other rule.

This new rule will need to be a multiple projects scoped rule, like the first one.

You'll need to have a condition in it to check the project of the triggering issue, like we had suggested in the first iteration of that other rule.

Why don't you make an attempt to construct that rule and show us what you come up with?

comments: author: Bar?? ?zer
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

Actually I want to do this.

How can we transfer the status change within this automation we have made?

**Maybe as a comment?**

If we do a different automation, we use too much automation. I don't actually want this.

Can we do this for this automation?

When the status changes in the INF Project, write a comment to the SD project.

**For example;**

**For example, when the Backlog status is In Progress, I want it to say = status changed In Progress.**

**How can we auto-comment the SD project?**


author: Trudy Claspill
body: Hello [@Bar?? ?zer](/t5/user/viewprofilepage/user-id/4828228)

It is possible to create an automation that is triggered by any one of multiple events, but Issue Commented is not one of the events that can be combined with others in a trigger.

![Screenshot 2024-04-05 at 10.26.20?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/316741iAA5B351C364A0EA8/image-size/large?v=v2&px=999 "Screenshot 2024-04-05 at 10.26.20?AM.png")

You will have to create a separate rule. You cannot have a single rule that is triggered by both a new Comment and by a status change.

The calculation of rule executions is not based simply on the rule being triggered, but on whether or not the rule then executes a meaningful action. If you use Conditions in the rule to determine if it should proceed with the Actions, and if those Conditions are not met, then the rule does not count as being executed. Refer to this for more information:

<https://support.atlassian.com/cloud-automation/docs/how-is-my-usage-calculated/>

Does that address your concern about too many rule executions occurring?

The alternative to an automation rule for this requirement would be to look at a third party app that would let you extend the Workflow capabilities so that you could add a script to the status transition directly in the workflow. You would then have to write an appropriate script to execute all the checks and then post the comment.


author: Bar?? ?zer
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

Now, I will create another Automation and I want to receive notifications/messages when the "status" changes in the issues linked to the issue.

It's like the comment rule we did before.

**Do I need to create a new automation? Did I understand correctly?**

I don't understand the screenshot you posted above. "Multiple Events" what should I do? Can you explain?

I want it to work in issue linked tickets from the SD Project to the INF project, when the relevant issue in the INF project is a status change.

The previous one will work when there is jira-pmo-cloud group.


author: Trudy Claspill
body: Hello [@Bar?? ?zer](/t5/user/viewprofilepage/user-id/4828228)

The screen image was to illustrate that it is possible to create rules that are triggered by multiple event types. For example you could create a rule that was triggered both by the Issue Created event and by the Issue Updated event, so that the same actions would be executed in both cases. However, as shown in that screen image Issue Commented is not one of the events available. You cannot have one rule that it triggered both by an issue getting a comment and by an issue going through a status change.

You will have to create a new, separate rule.

The rule will still have to be scoped for multiple projects, like the first rule.

The new rule will need to use the Issue Transitioned trigger.

<https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Issue-transitioned>

After the trigger add a condition to confirm that the Project of the triggering issue is the INF project.

You then want to add a For Each branch to look for the issues in the SD project that are linked to the trigger issue. (Replace CUS with the key for your SD project, and replace "Group A" with "jira-pmo-cloud".)

![Screenshot 2024-04-15 at 4.55.53?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/318467i826B5F21E3ECDCC5/image-size/large?v=v2&px=999 "Screenshot 2024-04-15 at 4.55.53?PM.png")

Then add an Action immediately after that. Use the Comment On Issue action. Add the text and smart values for whatever you want to include in the comment. Set the Comment visibility.

![Screenshot 2024-04-15 at 5.00.02?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/318469iE1FAC01A3B4DFBE1/image-size/large?v=v2&px=999 "Screenshot 2024-04-15 at 5.00.02?PM.png")

That all there is to it.

Trigger: Issue Transitioned

Condition: If Project=INF

For Each: JQL (to get the SD issues linked to the INF issue, where the reporter of the SD issue is in the jira-pmo-cloud group)

-- Comment on Issue: add a comment to the SD issue to note the change of status of the linked issue.


author: Bar?? ?zer
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

First of all, thank you very much.

I made the automation below, I will test it tomorrow.

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

++**Prevent duplicates by only adding this comment once to a particular issue.**++

What does it mean?

What happens if I mark it?

What happens if I don't mark it?

What does it do?

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


author: Bar?? ?zer
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

I want all these rules to work when the status is Issue is Linked in the Service Desk (SD) Project. So JQL I added this;

**project = SD and reporter in membersOf("jira-pmo-cloud") and status = "Issue is Linked" and issue in linkedIssues("{{triggerIssue.key}}")**

I tested it, it worked! (:

Is it true? I'm curious about your thoughts.

And I added this to the other automation we did for "comment".


author: Trudy Claspill
body: This is the first time you have mentioned limiting the rule actions to occur only when the SD issue is in a specific Status.

If that is what you want to do, then it appears that you have modified the JQL correctly for that.

If the SD issue is in any other status, then the actions will not be executed.


author: Bar?? ?zer
body: Hi [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)

Thank you very very much.

For everything! (:


Tags: administration

automation

cloud

jira-administration

jira-service-management

jira-service-management-cloud

jira-software

jira-software-cloud

rule