Automation to comment on issues in a filter and propagate the comment to linked issues

Aditya Rajaraman May 4, 2023

Hi, 

I manage a product though a Jira Project that is connected to a JSM Project. Client tickets are created on JSM and moved to be reviewed and actioned on the Jira Project. The Jira project also has other internally created tickets to be reviewed and actioned. 

I am looking to automate the communications as under

  1. I have a filter in the Jira project with the list of issues that I want to comment on. This I am able to do using
    1. A manual trigger
    2. Branch rules/Related issues - For JQL  filter = "Filter Name"
      1. Add comment to issue - 'Comment Body - Key Word'
  2. I now want to then find if any JSM tickets are linked to this JIRA ticket and if they are linked, I want the same comment on the JSM ticket. 
    I tried
    1. Trigger when Comment is the main action
    2. If {{comment.body}} contains Key Word
      1. Branch rules/Related issues - For JQL  filter = issue in linkedissues({{issue.key}}) and Project = "JSM Proj"
        1. Add comment to issue - 'Comment Body - Key Word'

I find that when I trigger the first automation manually, the Jira ticket does contain the required comment. The second automation is triggered correctly. It passes the If block, but does not find any related issues. 

 

The screenshots of the automation are as under

 

2023-05-04_14-48-09.png2023-05-04_14-48-19.png

 

1 answer

1 accepted

1 vote
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 4, 2023

Hello @Aditya Rajaraman 

Welcome to the community.

If you look at the For/Related Issue/JQL, you might notice this field that restricts further actions to being performed on the issues from the JQL that match the specified project.

Screen Shot 2023-05-04 at 12.14.38 PM.png

If your rule is triggered by a comment being added to issues in Project 1, but you want to make changes to linked issues that are in Project 2, then you need to set up a Global Rule so that the scope of the rule can be set to multiple projects. Only Jira Administrators can create Global Rules.

If you are a Jira Administrator and have questions about creating Global Rules, let us know.

If you are only a Project Administrator, then you are limited to creating rules that affect only the issues in one project at a time. The one exception to this is that you can create a rule that includes the Create Issue or Clone Issue actions to cause an issue to be created in another project.

Aditya Rajaraman May 4, 2023

Trudy, 

 

Thanks for the response. The Jira automation rule is set up for the Jira project, while the automation for the comment to be moved, is setup as multiple projects which includes both the JSM and the JIra project. 

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 4, 2023

What is the Rule restricted to projects setting in the Branch for your Comment propagation rule?

In Rule Details who is specified as the Actor for the rule? Does that actor have permissions in the JSM project?

For an instance where the Comment propagation rule was triggered but found no issues :

1. Can you show us the Audit Log for that execution of that rule?

2. Have you tried executing the same JQL manually in the Advanced Issue Search screen, substituting the actual issue key where you have the {{issue.key}} smart value?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events