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,557,818
Community Members
 
Community Events
184
Community Groups

I am new to Jira and I'm trying to populate a custom date value to a custom report using midori.

Hello,

I am new to Jira and I'm trying to populate a custom value to a custom Jira report. The value is as below.

Recovery Timeline: 31/Dec/19

We use Midori plugin for it and below is the block of code I'm trying to use. Did I miss something?

#set($recoverytimeline = $customFieldManager.getCustomFieldObjectByName("Recovery Timeline"))
#set($recoverytimelinevalue = $issue.getCustomFieldValue($recoverytimeline).getDateString())
<fo:table-cell padding="1mm" border-width="0.5mm" border-style="solid" number-columns-spanned="2" >
<fo:block space-before="1mm">
<fo:block>$xmlutils.escape($recoverytimelinevalue)</fo:block>
</fo:block>
</fo:table-cell>

2 answers

1 accepted

0 votes
Answer accepted

It was a date field. So I used the below code.

$userDateTimeFormatter.withDefaultZone().withStyle($dateTimeStyle.DATE).format($recoveryimelinevalue)

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Dec 17, 2019
  1. What happens when you use this?
  2. What is the type of the "Recovery Timeline" custom field?
  3. What is the type of the $recoverytimelinevalue object? (How do you know it provides a getDateString() getter?)

Hi Aron,

It was rendering a blank space when I was using the above code. I called it all wrong. With the below, I was able to populate the required value.

it was a date field. So I used the below code

$userDateTimeFormatter.withDefaultZone().withStyle($dateTimeStyle.DATE).format($recoveryimelinevalue)

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Dec 17, 2019

Awesome! (I'm the original author of the Better PDF Exporter app :-))

Like P likes this

That's nice to know. Midori is making my life a lot easy. Thank you for getting back to me. :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events