Hi all,
I hope you can provide some advice for me.
I am using Jira across different platforms (Android and iOS). My user stories are categorized with a component (iOS or Android). I have created two unreleased versions:
[A] 2.1
[iOS] 2.1
Now, I want to set up automation so that when an issue is resolved, the next unreleased release version is automatically added as the fix version to the issue. The challenge is that for Android, it should select the [A] 2.1 version, and for an iOS issue, it should select [iOS] 2.1.
Additionally, I'd like to make it dynamic, so after releasing those versions, when I create two new versions, the automation should automatically pick the new unreleased versions.
This is what I have now:
Do you have any ideas on how to achieve this?
This requires experts to pitch in. But in the mean time, can you share some more details about your fix version patterns?
- Do you create all your fix versions ahead of time? As in, does your project already have future android & iOS versions in place or will you create a new one only after you have released an existing one? So at any point you only have one unreleased version..
- Do you populate release dates for your fix versions ahead of time or do you populate only at the time of the release? Or do you not populate at all?
Lets assume one of the two below scenarios is true for you:
I think below logic should work:
(btw, Based on the screenshot, I am guessing you are in cloud edition.)
I havent tried above logic because I am in data center and we dont have advanced branch option but if you have made the API call to fetch your project's version, below thread discusses how to do advanced compare i mentioned..
you could do similar if conditions for iOS component in the same rule.
Hi Kalyan,
Thank you for your detailed answer, very helpful!
To answer your question's first:
So I understand your automation! I tried it but I get a 404 error:
{"errorMessages":["No project could be found with key 'XXX'."],"errors":{}}
Maybe our admin disabled the rest API but I need to check that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
404 error could be because of incorrect URL or credentials.
First lets eliminate URL issue.
https://yourdomain.net/rest/api/2/project/yourproject/versions
Do you see response?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
below is how mine is for FYI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My bad, I forgot to select the POST method.
When I open the URL myself I see the response.
However, the automation now throws an error 405 (405 Method Not Allowed)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to do a GET call when using above URL.
But before that, we need to ensure you are using the right credentials to authn/authz. In Data Center it is easy, we directly get bearer tokens. However in cloud, there are few additional steps to be able to make web request as listed here.
At a high level:
Final result will be the first screenshot listed in the link I posted earlier.
If you have not made a web request before, it seems like a lot of steps, so maybe we can wait to see if anyone else has any other options.
If not, we need to resolve your authentication so that we can move onto next steps..
Please review the link above in the mean time..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aah my bad, sorry!
It worked with the API key, so thanks for the help!
Would be nice if there is also a way to do this without making the API call, because I don't think they will leave it enabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nick
I feel like this can be done in either two branches, or two different automations altogether.
Are you storing the fix versions in two different custom fields (android and iOS)? Or is the triggering issue itself for an Android/iOS and you're just simply copying a value to the fix version from the triggering issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pierre,
Thanks for your answer!
So what I'm doing is that the story contains the component (Android or iOS).
The automation is triggered by any issue that transitions to a resolved state.
If that is the case, the automation has an if statement that checks if the component is Android. If that is the case, it should be added to [A] 2.1 in this example.
Of course, I can select that version in the automation but then the automation is not future proof when 2.1 is released and you want to work with 2.2.
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.