Hello,
Using Automation for Jira I am simply adding some comments to the ticket using SmartValues.
The field in question is 'Target start' (custom field from advanced roadmaps)
The field itself displays on the issues as:
However when I put it into the automation:
'This work has been scheduled to commence on {{Target start}}'
It comes out as:
Any idea how i can change the format into DD-MM-YYYY ?
Many Thanks
Phil
Hello John,
Cheers for the suggestion.
I have the automation setup as follows:
But if I use that format or {{issue.customfield_xxxxx.longDate}} it keeps coming out as :
It just ignores the Target start field completely, unless I add it in as {{Target start}} which then displays as 2020-10-17
Im stumped!!
Cheers
Phil
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.
Hey @John Funk
Unfortunately this hasn't worked either. It just returns no data.
Seems that this field isnt a date picker, but you can convert it to a date but not change the format.
Thanks for your suggestions in trying to help with this. Its much appreciated.
Cheers
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at this documentation - smart-values-date-and-time-functions . Focus on the
{{[date].[dateformat]}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jack Brickey
I did take a look at this page before I posted, it seems everything I try doesn't bring back any values at all.
Cheers
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the problem is going to be that the field is not a 'Date Picker' type of field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have not played with it myself. I did find this thread that seems to indicate the need of the “#” - Format-Custom-Field-Date
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.
Hi Jack,
If this is not a date field, but looks like a date field, then you'll have to parse it into a date first. You can do this with our `toDate` function. See "Converting text to dates" on https://confluence.atlassian.com/automation/working-with-dates-993924630.html
Something like {{issue.Target start.toDate.shortDate}} should work!
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
Thanks you for your responses in trying to help overcome this situation.
@John Funk i tried using the 'asLongDateTime' but unfortunately it returns no values and is blank.
@Andreas Knecht First of all I tried {{issue.Target start.toDate.shortDate}} but this returned 10/23/20
So then i combined that with the suggestion of John and used {{issue.Target start.toDate.longDate}}
This came back with October 23, 2020
This is a bit better for UK customers to understand but I'm still looking for that elusive dd/mm/yy format.
Using any of the below combinations produces no values.
{{issue.Target start.toDate("yyyy MM dd")}}
{{issue.Target start.toDate("dd MM yyyy")}}
{{issue.Target start.toDate("dd MM yy")}}
Cheers
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think these last ones are close but failing without the slashes.
If {{issue.Target start.toDate.shortDate}} successfully produces a date, the formatting piece for day-month-year would be:
{{issue.Target start.toDate.format("dd/MM/yy")}}
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.