Hello !
We are working on a environment with :
I want to create a Roadmap that is easy to use so as soon as a fixVersion is set on an Epic (or an Initiative), I would like to update the Target Start or Target End.
First issue :
Those fields are not available from Automation
Second issue :
(I decided to choose 2 other date fields)
I failed to compute my start date, it worked for my end date.
Here are my formulas :
Start Date : {{issue.fixVersions.startDate.min}}
End Date : {{issue.fixVersions.releaseDate.max}}
Do you have any idea why ?
Hi @Pierre VIAU ,
Developer from Automation here.
We currently don't have proper support for advance roadmaps, here's the public issue in our tracker encase we do at a later stage: https://community.atlassian.com/t5/Automation-questions/How-to-automate-startDate-endDate-with-Fix-Version-set/qaq-p/1689148
In terms of accessing fields you can use max and min over a list like fix versions, the thing to note with {{issue.fixVersions}} would be that it's the fixVersions attached to that particular issue, so if one of the dates is failing it could be that the ones attached don't have a startDate since it's optional on fixVersions. You might have to put conditions to ensure they are there before editing the date field.
If you require further help with fixVersions smart value then I suggest reaching out to support here: https://support.atlassian.com/
Thanks - good to have an authoritative answer on this!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pierre,
Your second issue is actually of problem of date type conversion.
releaseDate and startDate attributes are not the same type.
This made the trick for me:
Start Date : {{issue.fixVersions.startDate.jiraDate.toDate.min}}
End Date : {{issue.fixVersions.releaseDate.max}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks Darryl and Yvan :)
I will try again to work on my automation soon and be back to you with my solution !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For information, I was able to automate the setting that way :
{
"fields": {
"customfield_12807" : "{{issue.fixVersions.startDate.first}}",
"customfield_12808" : "{{issue.fixVersions.releaseDate.max}}"
}
}
Where the 2 custom fields are Target start and Target end dates, used in our Portfolio :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pierre VIAU
Just to confirm, are you certain the following works as you expect?
{{issue.fixVersions.startDate.first}}
Fix Versions is a list field, and so the above smart value will return the startDate of the first item in the list, regardless of the order of the values (or the position of the start date in that list). My understanding is that list fields do not have a built-in ordering mechanism, so your return value will be whatever order the values are given by Jira.
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! So you're using min and max. But I don't think that works with lists, and to be clear, because you can have multiple Fix Versions for an issue, the {{issue.fixVersions}} smart value is a list. And so when you reference startDate or releaseDate, those too are lists.
There's some good documentation about this here:
https://blog.codebarrel.io/automation-for-jira-smarter-smart-values-9da5598f2bdc
So, to clarify, are you trying to deal with the case where there are multiple fixVersions for an issue? If not, then you should just be able to use:
Start Date : {{issue.fixVersions.startDate.last}}
End Date : {{issue.fixVersions.releaseDate.last}}
(This assumes there's only one Fix Version, or that you want to get the start/release dates of the most recently added Fix Version.)
If you actually have multiple Fix Versions and you do actually need to determine which date is earliest/oldest, I wonder if there's some kind of complex formula you could use with .isAfter or .isBefore.
Here's a listinng of the functions available to date fields:
https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies. I don't work enough with Roadmaps or Epics, so I think I misunderstood your question.
I think this previous answer should do the trick:
Looks the fields you'll want to set are named End Date and Start Date.
And you might need to format the date you get from fixVersions using jiraDateTime.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ugh, actually I misread that last post I linked to. It was talking about Start Date and Due Date, but neither are linked to Target Start/End. Those do not appear to be accessible via Automation.
On my test Cloud instance, I don't even know where the Start Date field came from. I think it may have been created when I set up project based on the "IT service management" Template.
Under Plan Configuration there appears to be a way to use different fields in Plans. Perhaps that's worth looking at?
There's more details on this here: https://confluence.atlassian.com/advancedroadmapscloud/configure-plan-settings-998650959.html#Configureplansettings-dates
But again, I'm not an expert in Advanced roadmaps, so perhaps somebody else could chime in on what the best practice is here.
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.