Webhook String to custom date field

Neville April 19, 2024

{{webhookData.fields.Issue_date}}

In webhook data , it's return 2024/04/17.

I tried 

 

1. {{webhookData.fields.Issue_date.jiraDate}}
2. {{webhookData.fields.Issue_date.jiraDateTime}}
3. {{webhookData.fields.Issue_date.jqlDate}}
4. {{webhookData.fields.Issue_date.jqlDateTime}}
5. {{webhookData.fields.Issue_dateformat("yyyy-MM-dd")}}
6. {{webhookData.fields.Issue_date.toDate()}}


All of them are return null.
I would like to put this value to update a custom date field

1 answer

1 accepted

1 vote
Answer accepted
Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2024

Hi @Neville 

thank you for your question. What type of field is Issue_date? 
Is this also a custom field? Or is this webhook data from an external source?

If it is a valid date value, you should be able to populate another field with this issue regardless the date format.

Neville April 19, 2024

Hi @Kai Becker 

The Webhook data is from external source.

 

Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2024

Hi @Neville 

I guess the problem then is the format. Jira needs to recognize the value as a date.

please try the following: 

{{webhookData.fields.Issue_date.toDate()}}

or

{{webhookData.fields.Issue_date.toDate("yyyy/MM/dd")}}
Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events