Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira to Slack Automation - affectedVersion

Andrew Harrison
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2020

Hi

I’ve set up a Defect Notification channel in Slack that receives an automated notification from JIRA with all the key info we need when a new bug is raised for a specified project using the following message –

** New Bug Raised **

<https://xxxxxxx.atlassian.net/browse/{{issue.key}}|{{issue.key}}>

{{issue.summary}}

Severity - {{issue.customfield_11163}}

Priority - {{issue.priority}}

Raised by - {{reporter.displayName}}

Scrum Team - {{issue.customfield_11164}}

Detected in Phase - {{issue.customfield_11160}}

Affects Versions - {{issue.affectedVersion}}

Labels - {{issue.labels}}

All the info is included in the slack notification as expected with the exception of affectedVersion which is always blank, do you have any idea what’s causing this or if there’s another field I should be using to include the required info?

I’ve also tried using issue.version but it pulled through 10604 rather than Test 1 as expected.

Automation for Jira APP
** New Bug Raised **

DNS-001 Testing Affects Version - Again!

Severity - Sev 1
Priority - 1
Raised by - Andrew Harrison
Detected in Phase - In Sprint
Affects Versions - 10604

Anything you can suggest would be greatly appreciated!

1 answer

1 accepted

0 votes
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2020

Hey Andrew, welcome to the Community!

What you've got looks great, with just one minor tweak needed to get the value you want. Adding .name should get you the actual version instead of the version's internal id:

Affects Versions - {{issue.version.name}}

Great use of Automation and smart values!

Cheers,
Daniel

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.
July 21, 2020

Hi  @Daniel Eads 

Would it instead be {{issue.versions}} because Affects Versions is potentially a list of values?

I saw that smart value noted on the Smart Values, General documentation page:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

Thanks!

Like Andrew Harrison likes this

Suggest an answer

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

Atlassian Community Events