I have an automation that has a Manual trigger - it is not triggered by a Version event.
In my automation, a user enters a version name as input when this rule is run manually and in the automation I want to check that the version exists
So I have the version name from the user input but how do I either get other details about the version such as the id OR just check whether the version exists
I am trying
https://xxxxxxxx.net/rest/api/3/project/ITP/version?query=<user entered string>
and if the <user entered string> is a VALID version name, I get something like this in the response
body={self=https://xxxxxxxx.atlassian.net/rest/api/3/project/ITP/version?maxResults=50&startAt=0, maxResults=50, startAt=0, total=1, isLast=true, values=[{self=https://xxxxxxxx.atlassian.net/rest/api/3/version/35289, id=35289, name=abc, archived=false, released=false, projectId=12345}]}
But if the user enters an invalid string, the automation takes a long time to run then times out.
Is there a better way of doing this?
Hi @Rees_ Ian
You appear to be using this function, correct: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-project-projectidorkey-version-get
When I call that without a matching text to a version, it comes back immediately.
For which versions is the person searching?
Let's assume the version needed is unreleased, and they are trying to match on the name. The REST API query could instead pull back all of the unreleased ones with status=unreleased and then use a match() with a dynamic regular expression (built from the manual trigger input) to find the correct one, if it exists.
Kind regards,
Bill
Thanks Bill,
I am basically trying to check for a mistype, where what the person has entered is not a version at all. It doesn't matter whether the Version is Released or Unreleased. Tbh it is quite a complex combination of automation and Automated Release Notes, that I have created to enable my internal users to test automation using a Clone on an existing version (including clones of its contents).
I've been doing some testing and I think with the above and I think I may be able to check {{webresponse.body.values.id}} is empty,null or 0 or something when an invalid version name is entered. Interesting that you get a return immediately - I will retest and see if maybe the delay I was seeing was a temporary system problem. That insight is useful - thanks for your help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We developed CIFJ - Versions Dashboard for Jira
https://marketplace.atlassian.com/apps/1235582/cifj-versions-dashboard?hosting=cloud&tab=overview
This might help you with your search.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Petru Simion _Simitech Ltd__
You have necro-posted similar content to recommend your marketplace product more than a dozen times today, which does not adhere to the community guidelines. Some of your posts are to threads over a decade old.
Please carefully read these guidelines before posting further in the community. Thank you.
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.
Thanks. I will read and comply.
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.