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
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,115 views 4 9
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