Hi!
I want to set up a rule that when an issue is added to a sprint, if that issue is for an "on-prem" deployment type, I need to inform the "fix version" field with the version that starts with X and also inform a field "planned released" with the "release date" of the version release added.
The project where those issues reside is a multi-product project, so different releases belong to other products. I want to filter the release version by the earliest one that starts with X and inform a "customfield_10084" with the release date.
I've managed to add the version, but not filtered by the "X" name, and I don't know how to do it. I also cannot get the release date in the custom field. I used: {{issue.fixVersion.releaseDate}} but do not work. :S
I would appreciate your help.
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
To filter the versions, you could try smart value, list filtering: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
Regarding the release date value, does your issue contain multiple fix versions? If so, the smart value you should could be producing a list of values, separated by commas. Once you filter to one value the date set should be correct.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The current issue does not contain any fixed version; I want to add the next release version (unreleased, specifically the one that starts with "SLM") because the project contains different products.
Also, I need to update the planned release field with the release date of the version added.
Let me know if that is enough for you. I used the smartvalue: {{issue.fixVersion.releaseDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Context is important for automation rules, so please show images of:
Where have you tried to filter the version value before setting it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy I've added a JQL but do not work. Not sure how to do it. This is the last error, and the screenshots of the rule. The first part is working fine, it is only the second part with the "on-prem" scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With the Release Version action, an exact name must be given. It cannot search for a name using the CONTAINS ~ operator, like with JQL.
Based on what you described, you are trying to release the version assigned to the issue which has a name start containing the text SLM, and which is not yet released.
As the fix version field can contain multiple values, that will require multiple steps before the release action:
The first smart value for the variable works by iterating over the fix version field, saving any name, released status, and id values in a delimited list.
The second one splits the variable back apart, filtering on the name and released status first, and then extracting the id value for the version.
This technique will not work if there are multiple versions containing "SLM" assigned to the same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the answer, although I may not have explained what I wanted to do.
I do not want to release any version; I want to add the version to the issue that triggers the rule, and use the "release date" of that version to populate a custom field named "planned released."
As you mentioned, there is no way I can filter the release by the name and add the right one to the issue.
I may have to think of another way to accomplish that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've tried your approach, and the result was that a "version release" was released but not added to the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found this, but I'm not entirely sure to understand how this can be created and work: https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-Get-the-next-unreleased-version-by-criteria/qaq-p/2202432#:~:text=I%20think%20I,earliest%20release%20date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've managed to add the version (specific one) but not to add the {{issue.fixVersion.releaseDate}} to the custom field. my JSON is not right, I guess
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you did not want the rule to release a version why did your rule use the Release Version action? That does not seem to match what you are now describing as the need, or the original question.
The latest rule you show appears to have a specific version selected, "SLM 9.34.0", and to select the "Next unreleased version". That cannot work in a rule as it is trying to edit the same field twice: fix versions.
That approach also does not match what you described as the original question.
With the unclear nature of the problem you are trying to solve, I have two recommendations:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
I did a mistake using the release action, that's why I requested help, because I cannot get what I'm trying to achieve.
The original question was and still is:
"I want to set up a rule that when an issue is added to a sprint, if that issue is for an "on-prem" deployment type, I need to inform the "fix version" field with the version that starts with SLM and also inform a field "planned released" with the "release date" of the version release added.
The project where those issues reside is a multi-product project, so different releases belong to other products. I want to filter the release version by the earliest one that starts with SLM and inform a "customfield_10084" with the release date."
1. Inform the fix version field with the next unreleased version for SML (in that project there are other releases different than SLM).
2. Use the fixversion.releasedate to populate a custom field named "planned release"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you want to find a specific, unreleased version and then assign it to the issue, your rule could do this:
Using the Send Web Request action, call the REST API function to search for the version, and then use both the id and release date values.
An example search would be this:
<your Jira URL>/rest/api/3/project/SIT/version?query=SLM&status=unreleased
This would search in your project SIT, for an unreleased version with SLM in the name or description. Please update that if the project is not named SIT.
Assuming only one result is found, the values in the response for the version id and release date would be:
{{webhookResponse.body.values.id}}
{{webhookResponse.body.values.releaseDate}}
Here are the references needed to implement this rule:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--webhookResponse--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot, @Bill Sheboy . I appreciate your help.
It is proving to be quite a challenge for me as someone without an engineering background. I'll need engineering support. I find it difficult to understand JSON, and this REST API is a bit more complex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've managed to get a JIRA token and follow the instructions that you provided. But without an understanding of the language it is too complex:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries; we are all learning. A few adjustments to your call to the REST API...
For that function, do not pass any data for the Send Web Request action:
Please re-read that how-to article as your header is incorrect:
The results of the call will be in the {{webhookResponse}} smart value. The smart values I noted are the ones which will contain what you wanted.
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.