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

When issue rank changes, notify slack channel

Mauricio Heberle
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.
April 3, 2023

Hey everyone! I've got the following scenario:

My team wants a notification to be sent everytime they update an issue rank.

Heres is my current setup

Captura de Tela 2023-04-03 às 16.31.30.png

It works, but as you can see, in order to create a list of the issues that I want to send via Slack, I must add the loopkup with a JQL.

The problem is, the Rank field is really tricky to work with in Jira and theres no viable JQL to write it, so I put the "updated >= - 60m" to filter recent altered ranked issues. Obviously, it is causing that anytime an issue is updated (like any custom field), it triggers the automation.

I thought about using smart values, and thats where someone might have a solution which I havent found. Heres what I tried:

{{issue.latest.changelog}}  -- Because I want a way to condition the latest change log, but it gives a strange result -> ChangeLogList{startAt=0, maxResults=0, total=0, histories=null}

{{issue.changelog.Rank}} -- It shows the the log correctly, but without a way to filter it as the most recent, it wont properly work either --> ChangeItemBean{fieldId='customfield_10400', field='Rank', fieldType='null', from='', fromString='', to='', toString='Ranked higher'}

I know its a long explanation, but thats it. Any tips are welcome! Thanks in advance.

 

1 answer

0 votes
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.
April 5, 2023

Hi @Mauricio Heberle 

Your rule is triggered on any update, and then checks for a change to Rank before proceeding.  That will trigger for each issue meeting that criteria.

And so, what is the purpose of your lookup issues action?  If you remove that and just use the {{triggerIssue}} information, that would do what you describe.

Or instead, are you looking for some type of rollup of "issues re-ranked in the last X-time units"?

Kind regards,
Bill

Mauricio Heberle
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.
April 6, 2023

Hi @Bill Sheboy !

"Or instead, are you looking for some type of rollup of "issues re-ranked in the last X-time units"?"

Yes, whenever people reorder issue ranks of a project within a timeframe, I want to send the list of the issues that were rearranged, based on their rank. Does that make sense? The only way I know how to create a list, is using the lookup. Problem is how to create a proper jql to combine altered ranks and timeframe

I dont understand how the triggerissue would help me in this case, but thanks in advance.

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.
April 6, 2023

Thanks for clarifying. If you wanted to notification with each single change, that is where {{triggerIssue}} would help. 

But you seem to want a list of re-ranked items, such as for the last hour...I can think of two ways to do that:

  1. Walk all of the open issues and check the change log for Rank changes, and then report on those.  That may not be easy to rollup the information.
  2. Use two rules, where one detects a Rank change (as you have done) and then save that date/time in a custom field.  You could then use a second, scheduled trigger rule to query that custom field with JQL in a lookup issues action to send the notification.

Honestly and IMHO, this seems a bit much to get alerts on Rank changes in a tool outside of Jira (i.e., Slack).  It makes me wonder about the team practices as this might be disruptive getting push-notifications as a product owner is just doing their daily work of ordering a backlog.

Mauricio Heberle
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.
April 6, 2023

I searched a lot about point 1., but it just seems impossible due to JQL syntax and how Jira treats the Rank field. 

I guess the best option is to talk to my team and change how we will approach theses alerts.

Thanks, Bill!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events