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.
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.