Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA Workflow Toolbox Date Format

Marc Jason Mutuc
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.
July 10, 2018 edited

I'm currently using the Parse Post Function of JIRA Workflow Toolbox and would like to ask how to format the parsed data from the Date Picker Custom Field? Ideally, it should be dd/Mmm/yy which is how JIRA shows dates.

Also, I don't need the time element and would like to remove it. Thanks!

I'm using the advanced option since I'm also getting Full Names of Single/Multiple User Picker Custom fields. It display's nicely when I'm just using Basic.

1 answer

1 accepted

2 votes
Answer accepted
Alexandra Holom July 11, 2018

Hi @Marc Jason Mutuc,

The post function you should use is: Copy parsed text to a field.

The expression that you need if you have a custom field of type Date Time Picker is this one:

dateTimeToString({10100}, "dd/MMM/yyyy", USER_LANG)

where {10100} is the field code for the custom field, which you can select when editing the post function. You can check out the documentation for date/time parser functions here.

By the way, are you familiar with our relatively new Expression Parser Test page where you can simulate the output of an expression based on an issue?

Hope this helps!

Best regards,

Alexandra

Marc Jason Mutuc
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.
July 11, 2018

Errr... The Expression Parser Test is not available for some reason.

Good news is, the script you provided is working! Any reference you could point me to in case I need a different format?

Alexandra Holom July 12, 2018 edited

Hello,

the Expression Parser Test page is accessible when you look in the Administration -> Add-Ons - Jira Workflow Toolbox (left sidebar) -> Expression Parser Test. But this is available only starting with version 2.4.0.

Regarding the date format, it is Java standard date format, so the official documentation is here.

The function dateTimeToString accepts multiple parameters, so if you check out this page and look for the function, you will see all available parameters, including references to the Java date-time pattern documentation.

 

Best regards,

Alexandra

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events