Velocity | Display formatted date / time

Hi,

I am trying to display a formatted time in JIRA as a result of a custom field. But for some reason all I get is the velocity syntax, rather than the actual time.

This is what I have in my JAVA file:

updateValue(field, mu,  new Timestamp(date.getTime())); 
map.put("UTC", new Timestamp(date.getTime())); 
 

This in my velocity file:

$dateFieldFormat.format($!value)

If I put ``$!value'' alone in the velocity file, it does show the timestamp, but not in the right format (it is not consitent with the other time definitions displayed in the issue, created, updated, etc)

When I use this velocit, I get a date but not in the right format:

$outlookdate.formatIso8601($!value)

Is there a way to change this behaviour?

Cheers,

Hendri

1 answer

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

Mission-critical battery manufacturer fulfills FAA software requirements with Commit Policy Plugin

EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...

155 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you