I have a Jira filter which uses the fix version field as a criteria.
Currently I manually update the fix version in the filter on a weekly basis.
The format of the fix version is standardized as vYYYYMMDD, I'd like to use automation to update the JQL in the filter on a weekly basis with the correct fix version via the API.
Hello @Richard A_ Michaels
Please share with us the rule you have constructed so far and let us know with which part specifically you need help.
HI Trudy,
Thanks for the reply. The automation is currently setup as a manual trigger with a single Send Web Request action. The URL and custom data are below. The call also has the authentication header. The fixVersion value is hard coded for now until I can successfully update the filter with the API call.
URL
https://my-company.atlassian.net/rest/api/3/filter/22638
Custom Data
{
"description": "VTrack Release Filter",
"jql": "fixVersion=v20230206 ORDER BY key ASC",
"name": "Automation Test - Vtrack Release Tickets"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, is your question "how do I dynamically derive the fixVersion value based on the date the automation runs?"
If that is your question, my next question is what is the relation between the date (or day of week or month) that the automation will run and the fixVersion value that would be used in the filter?
There are a variety of date and time functions that can be used with smart values in automation rules to derive and format date strings based on the current date/time or custom date/time fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
I'm getting a "bad request" error when I submit the call.
That's why I hard coded the fix version to ensure the API call can be successful with static data. That is not happenings. I've did discover the jql was invalid but that wasn't what is causing it to be a bad request.
Here's updated custom data. I validated the jql by creating an actual filter with just the information below.
{
"description": "VTrack Release Filter",
"jql": "fixVersion = v20230227",
"name": "Automation Test - Vtrack Release Tickets"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've done some experimentation myself. I found that I got "bad request" when
- I provided a fixVersion value that did not actually exist in Jira
- If the JQL string included within it a value encapsulated in double quotes; i.e.
"jql": "fixVersion = "ver 20230227"",
The latter clearly doesn't apply to you, but does the former?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
This issue has been resolved. It was a simple extra character in the header because of copy paste.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Richard A_ Michaels can you paste the one which is working in your case please. I am getting error while writing JQL query. @Trudy Claspill can you please help here to create the filter dynamically
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.