Jira Automation Release Version + Send Message in Slack

Vanessa
Contributor
February 18, 2022

Hello, 

we are using an automation in Jira

-> if a version is released, the issue will be looked up and a message will be posted in Slack and Microsoft Teams.

It worked the whole time, now the problem appeared that the message always contains a different version (as it should) but the same issue, even though this certain Issue is not tagged with the Version.

Anyone an idea what is wrong?

We are using Jira Cloud and it is a company managed project.

Here is our Automation:

Bildschirmfoto 2022-02-18 um 13.45.26.png

 

Thank you so much in advance!

 

- Vanessa

1 answer

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2022

Hi @Vanessa 

Could you please add a screenshot showing the audit log?

 

Best
Stefan

Vanessa
Contributor
February 21, 2022

Hello @Stefan Salzl 

Yes sure, this is the audit log from the day we faced the issue.
The config change was only that we disabled it once and enabled it again.

image.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

hi @Vanessa ,

sorry for my incomplete requirement. Could you please show me the output of an audit log to see what gets processed?

Best
Stefan

Vanessa
Contributor
February 21, 2022

Hello @Stefan Salzl 

No Problem at all!

Is this alright?

image.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

Hi @Vanessa 

It seems the JQL for the lookupIssue isn´t correct. I couldn´t validate the JQL with latestReleasedVersion. 

Please try to add () --> fixVersion = latestReleasedVersion()

That worked on my site (see screenshot)

image.png

 

Best

Stefan

Vanessa
Contributor
February 21, 2022

Hi @Stefan Salzl 

 

I think we already had the same JQL in there.
It is still only showing me this one Issue.

 

Bildschirmfoto 2022-02-21 um 16.28.40.png

Is it maybe the case, that it is always showing me this one certain issue because it has the latest release version and all other issues have been released a few minutes before that?

If so, would you know how to adjust the automation?

So if I release a version, it should look up this exact issue and post this in Slack and Teams. 

 

I am sorry for the inconvenience,

 

all the best

-Vanessa

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

mkay....found the solution (which to me is reeeally silly but it´s documented in the documentation):

Note, the "latest" is determined by the ordering assigned to the versions, not by actual Version Due Dates.

Which means: depending of your ordering in the versions/release page the latestReleasedVersion() will always pick the one from the very top.

 

Nevertheless i was thinking about an even more fitting solution in your case:
As you definitly would like to stick to the version you just released it would be more acurate to use the version smartvalue directly in your JQL. Thus you REALLY refer to the version that triggered the rule (which is exactly what you would like to see i guess)

image.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2022

Hi @Vanessa ,

Any update on this? could you test the suggested solution?

Please let me know if this works for you and in case your problem is solved please consider to accept the answer so this question is marked "solved" and other people in need can find the solution easier.

Best
Stefan

Vanessa
Contributor
February 23, 2022

Hi @Stefan Salzl 

thank you for your patience!
I just tested it and it works perfectly fine! :) 

Thank you so much for the help through the whole process.

All the best,

Vanessa 

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2022

Hi @Vanessa ,

Awesome. So happy it works now.

You are welcome. It was my pleasure. That´s what the community is for ;)

 

Best
Stefan

Brent Williams April 4, 2023

Hey @Stefan Salzl

 

Thanks for answering the above. I'm trying to get the same thing to work but continue to get an error when I try to follow the suggestion to use version.name. Currently the only part of the message to come through on slack is the version name but no issue titles or links.

"New version (iOS 2.0.4).
 *  -  -"

Thanks for taking a look!


Error:

"Lookup issues
There was an error executing a search during custom value definition: .
Custom Smart Value JQL Search: "(fixVersion = iOS 2.0.4) AND (project in (10016))" - Error in the JQL Query: Expecting either 'OR' or 'AND' but got '2.0.4'. (line 1, character 19)"

 

Screenshot 2023-04-04 at 10.43.53 PM.png

Screenshot 2023-04-04 at 10.45.52 PM.png

Like Andre VORAKHOUMANE likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2023

Hi @Brent Williams 

Currently I can only answer from my mobile. I cannot 100% verify but I have a guess:

From my point of view it seems to be the blank in your version that causes this error.

Could you try to set your version i  quotes in your jql?

Best

Stefan

Brent Williams April 6, 2023

Thanks for the response.

 

I dont understand, can you tell me more about what you mean?

"Could you try to set your version i quotes in your jql?"

 

Do you mean set your version in quotes so:

fixVersion = {{"version.name"}} or fixVersion = {{"iOS 2.0.4"}}?

 

My concern is that I dont want to hard code a version but always reference the version that triggered the automation.

 

Thanks again!

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2023

Hey @Brent Williams 

sorry for the confusing. I meant the smart value of your version. 

Try the following:

fixVersion = “{{version.name}}“

 

The smart will resolve between the quotes and then seen as 1 string. You could also try this in the usual issue search with jql. Inserting the version with a space but not using quotes would not work.

Hope this clears thing up.

Best
Stefan

Brent Williams April 6, 2023

@Stefan Salzl thanks so much, it worked!

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2023

@Brent Williams 

AWESOME!! great to know you hot that working.

Thanks for the feedback.

Best
Stefan

Harshal Rathee October 10, 2024

Hello, 

I want to send this slack message -> Hello Everyone, new version of {{version.name}} {{#lookupissues}} * {{key}} - {{summary}} - {{url}} {{/}} has been released.

But I want the version.name to be sent as a Jira released version link and not just as text so that viewers can additionally open the Jira released version. 

Can you please help me on this, thanks. 

Regards

Harshal

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events