I have a Confiform in Confluence that is populating fields based on information in a Jira ticket based on the Key the user fills in.
One of the fields is pulling in the Created Date which in Jira has the format dd/MMM/' 'yy HH:mm PM
We only want the date portion, but no matter how I use the "formatDate" function, or the "convertDate" function it won't pull the information into Confluence.
If I don't format it, I just put fields.created it populates the field in the form as: yyyy-MM-ddT16:28:02.860-0500
If I do try to format it, it leaves the field blank.
Any ideas on what I'm doing wrong or how I can pull just the date portion of the information from Jira?
Hi
Yes, there is a bit of a confusion ConfiForms is having and you need to help it with a parseDate function and Jira format for date/time field
fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ)
Then you can either format it or extract a timestamp
fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).formatDate(yyyy-MM-dd)
fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).timestamp
Hope it helps
Alex
You Sir are a God.
Thank you so much, this is now working flawlessly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alex.
As you advised, I entered the parsed and formatted date below into the Field Name (see the first attached image):
myissue.fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).formatDate(yyyy-MM-dd)
But, the date is still not formatted. See the second attached image. I don't know what I have done wrong
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see a different (and an expected) result
Hard to "debug" your configuration by looking at these photos...
But did a quick test, following the advise given to Erin earlier and that works just as mentuined
In my screenshot the second column is a field with field name set to
myissue.fields.created
And the 3rd column is the field with field name set to
myissue.fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).formatDate(yyyy-MM-dd)
myissue is the name of the field (Jira issue type) in my form
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your prompt response, Alex.
I will try this again when my Confluence comes up, and get back to you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
I noticed my mistake: Instead of single colon, I entered double colon between "ss" and "SSSZ". (ss:SSZ)
I changed it to single colon (ss.SSZ), and it is working now
Thanks so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please, how do I format the Created Date (mentioned by Erin Smith) in "ConfiForms Form Field" Macro?
In the Macro, I entered myissue.fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ) as the field name, and yyyy-MM-dd inside the Override output format text box.
But, the format is not changing to yyyy-MM-dd.
Kindly assist
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You do it by parsing and formatting the date as explained in my earlier comment to Erin
myissue.fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).formatDate(yyyy-MM-dd)
Alex
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.