Summary
I have a pretty simple automation that sends a slack notification when a fixversion is created that matches certain parameters (I just need to notify team members of versions being created that have the name patch in it). It works pretty well, with one problem.
The problem - Duplicate Notifications
Since fixversions need to be created in each jira project, if a product owner creates the same fixversion in multiple jira projects, it results in duplicate notifications to the slack channel (see image)
Ideally we only need one notification that a patch version has been created.
Solution - Is there a better way?
I was able to fix this by adjusting my automation rule to the following, but I am wondering if there is a better way to do it. See below for the way I accomplished this.
The key to this automation rule, is that each time a version is created with the name including "patch" it creates a seperate jira ticket in project "PATCH" and logs the version name in a field called "Patch Name" (see below image)
Then "for the most recently created issue" it performs a lookup using a JQL with the JQL being "patch name" ~ "{{version.name}}"
If {{lookupIssues.size}} = 1 then it posts a slack notification. If the size is more than 1, nothing happens.
Your work-around seems like a good approach to me to prevent the duplication.
I can think of a few other ways to solve this, including only sending the Slack message from one project's automation rule:
Create/designate a single Jira project (e.g. your PATCH) as the one with the rule which would notify Slack. In each other project, add a rule which, when it creates own version, calls the REST API function to create the same version in the PATCH project. Ignore any errors for duplicate create attempts (or first check if it is present). Here is the REST API method reference: https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/version-createVersion and here is one on calling the REST API with a web request from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
Currently I believe that only Advanced Roadmaps has the ability to align/synch versions across projects, but there is no automation specifically for roadmap events to use that to help. Perhaps watch to see if those features are added in the future to help with your use case.
Kind regards,
Bill
Is it always the case that the same version number is created for each project?
If yes then would it be possible to restrict the automation rule to just one project?
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the fixversin name/number will be the same across all projects.
Given your suggestion I am not quite sure why I would restrict the notification to one project.
Sometimes the Patch version will be created in Project A & B, other times the patch version may be created in B & C or sometimes the patch version can exist in just project D.
It just varies depending on which project will need a patch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got it. Thanks for clarifying. That was exactly the intention of my question if each version is ALWAYS create throughout ALL products or if this could be only 1 or sometimes more products 🙌🏼
hmmm.....that‘s really tricky. As versions/releases are not issues a jql is not helpful in this case. The only thing that comes to my mind would be to fire a api call to jira (right after the trigger) in order to check if there are already releases with this name.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.