Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,229
Community Members
 
Community Events
184
Community Groups

Confiform: Formatting dates pulled from Jira

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?

3 answers

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 28, 2021

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.

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

 Date Value entered into Field name.jpegTable View Output .jpeg 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 21, 2023

I see a different (and an expected) result

Screenshot 2023-03-21 at 15.42.20.png

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

Thanks for your prompt response, Alex.

I will try this again when my Confluence comes up, and get back to you

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!

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 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 21, 2023

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events