Hi there,
In our Jira Product Discovery project I have a custom field for the "End Date" that includes a start and end date. Ex:
cf[11979] = {"start":"2024-03-01","end":"2024-03-31"} |
I am attempting to create an automation to change a project's status color from green or yellow to RED once the "End Date" has passed.
When trying to create the automation:
When: Scheduled
Then: Edit Issue (To change the project status to RED)
I am getting hung up in the JQL due to operators not being supported by the custom field:
project = "My Project" AND status = "Project in Progress" AND status not in("Project Closure") AND cf[11979] ~ "> -1d" |
My first thought was to change the custom field to include the End Date only and have a separate custom field for the start date.
With Admin permissions I am unable to:
a.) Locate the custom field to edit except for tracking down the JSON code for a clue using
https://<yourinstance>.atlassian.net/rest/api/3/field resulting in this code:
{"id":"customfield_11979","key":"customfield_11979","name":"End Date","untranslatedName":"End Date","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[11979]","End Date"]
My second thought was to find a way for the JQL code right to just pull the "end":"[Date]" for purpose of the automation (see underlined below)
cf[11979] = {"start":"2024-03-01","end":"2024-03-31"} |
Alas, no progress in either direction. Has anyone else ran in to this during automation?
There are several similar posts in the JPD community area with customers trying to use this new "date" field layout created by JPD team. Until they add support to automation and JQL for this field type...
Others have been successful extracting the date needed (start or end) from the custom field using text functions, and then converting with the toDate function:
After that you should be able to perform the comparison to {{now}}
Kind regards,
Bill
You could:
(1) Setup smart variables:
StartDate:
{{issue.cf[11979].match("(\d{2,4}-\d{1,2}-\d{1,2})").first.toDate("yyyy-MM-dd")}}
and
EndDate:
{{issue.cf[11979].match("(\d{2,4}-\d{1,2}-\d{1,2})").last.toDate("yyyy-MM-dd")}}}}
Then JQL for if:
{{EndDate}} > now()
Thanks to Chad Nauman for this
---
(2) use the built in Project Start and Project Target fields
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.