Trigger issue-assigned rule when issue created with assignee prefilled; suppress in-app notification

Alex Burka January 13, 2025

We have several automations of the following format:

 

When: issue assigned

    If: Assignee is one of [all members of a team]

    Then: Edit issue fields: set Team to [the team]

 

However, you can preassign an issue to a user on the issue creation screen. In that case, it seems that the issue-assigned condition is not triggered.

As a workaround, I created another rule as follows:

 

When: issue created

    If: Assignee is not empty

    Then: Edit issue fields: clear Assignee

    And: Edit issue fields: copy Assignee from current issue

 

This rule sets the issue to Unassigned, and then back to the original assignee, thereby triggering the issue-assigned rule to set the team.

This all works. However, recently, the second rule started sending an in-app notification saying "Automation for Jira unassigned you from an issue". This is annoying.

My questions are as follows:

1. Is it possible to suppress the notification? I already tried deselecting "this rule should send emails" and the Remove Watchers trick mentioned here. Neither helped.

2. I realize that I am asking about an X-Y problem here (X = trigger the first rule when a preassigned issue is created, Y = suppress the notification from the second rule), which is why I gave the full context. If there is a better way to do X then I am all ears.

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2025

Hi @Alex Burka 

I recall there are several open suggestions about configuring issue event, notifications based on rule changes.  Until one of those is implemented...

The fix for this is not unassigning the issue, and instead replicate the team-identification logic:

  • In your rule triggered on Issue Assigned, uncheck the option in the details to "Check to allow other rule actions to trigger this rule..."
  • In your rule triggered on Issue Created, add the logic to check if the issue is assigned, compare to the team member list, and edit the Team field.  Unfortunately, this will require maintaining both rules to keep the user lists in sync.

 

If you want to reuse the rule logic to set the Team field, you could create a third rule which is "called" from the other two:

  1. Create a rule with the Incoming Webhook Trigger, receiving the issue as a parameter, checking the Assignee and setting the Team field, as needed.  Save the URL from the trigger for use later...
  2. Modify your rule with the Issue Assigned Trigger, replacing the logic with a Send Web Request action which calls the first rule, using the URL saved above, and passing the issue as data
  3. Modify your rule with the Issue Created Trigger in the same way as above so it calls the first rule

To learn more about using the Send Web Request trigger this way, please see this article: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

 

Kind regards,
Bill

Alex Burka January 13, 2025

The webhook trick seems to work. Note that setting the request body to "Issue (Automation format)" or "Issue (JQL format)" did not work; the receiving rule claimed there was no issue in the body. I had to set a custom body as `{"issues":["{{issue.key}}"]}`.

Like Bill Sheboy likes this
0 votes
Alex Burka January 13, 2025

edit: nevermind

Suggest an answer

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

Atlassian Community Events