Not able to get current date in a date picker custom field

Vinay Sharma
Contributor
November 23, 2024

Need to get a current date in a date picker custom field for an issue via post function (Set Value of Jira Misc Workflow Extension - JMWE) in Jira Data Center

Using {{now.format("d/MMM/yy")}}

However unable to get it

Is there any error? Please suggest

 

3 answers

1 vote
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2024

Hi @Vinay Sharma ,

What format are you trying to achieve here?

You can reference this documentation: https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html, this has a list of predefined formats that might suit your needs, else the custom format that @Humashankar VJ mentioned should work for give the date in this format "2024-11-24"

Vinay Sharma
Contributor
November 25, 2024

Thanks @Jehan Bhathena

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2024

Hey @Vinay Sharma 

If you found the solution please can you share it here?

You can mark that as the Accepted Answer then.

0 votes
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2025

Hi @Vinay Sharma,

In JMWE you can use new Date() to get the current date.

JMWE provides hints on the Expected Value tab, you can check them to get example values ​​for each field type:Screenshot 2025-01-12 at 22.57.21.png

0 votes
Humashankar VJ
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.
November 23, 2024

Hi @Vinay Sharma 

Kindly try correcting the date format and give a try to keep moving

{{now.format("yyyy-MM-dd")}}

To learn more - Changing format of Date Time Picker custom fields

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

 

Vinay Sharma
Contributor
November 25, 2024

Thanks @Humashankar VJ 

Like Humashankar VJ likes this

Suggest an answer

Log in or Sign up to answer