Forums

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

how to get the value of date field using smart values

Muhammad Akram Sharifi
Contributor
August 10, 2022

Hi Everyone,

I have a date type field I would like to have an automation to send me an email when the value of "delivery date" is changed

I have used this statement is giving me the current date of the Delivery but Not the previous date.

{{ changelog.issue.fields["Delivery Date"].fromString }} to {{ issue.fields["Delivery Date"] }}

 

appreciate your advices in advance. 

 

3 answers

0 votes
Joseph Chung Yin
Community Champion
August 10, 2022

@Muhammad Akram Sharifi -

Try out this syntax -

{{#changelog.Delivery Date}}.{{fromString}}{{/}} to {{issue.Delivery Date}}

A great way to debug your rule is to use the "Log action" action to write out your smartvalue output to the audit log.

I have use the above action "Log action" to test out a date field "Actual start" changes and capture the before and now value in my test rule for your reference -

2022-08-10_15-39-12.png

Original: {{#changelog.Actual start}}{{fromString}}{{/}} Now: {{issue.Actual start.format("dd/MMM/yy h.mm a")}}

Hope this helps you.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

0 votes
Joseph Chung Yin
Community Champion
August 10, 2022

@Muhammad Akram Sharifi -

Does this means that your smartvalue setup is not working?  What is your ask?

Best, Joseph

Muhammad Akram Sharifi
Contributor
August 10, 2022

Yes this setup for a date field is not working it only give me the current value of the field not the previous value. 

Muhammad Akram Sharifi
Contributor
August 10, 2022

Hi @Joseph Chung Yin 

Delivery Date changed  From: {{ changelog.Delivery Date.fromString }} to {{ issue.fields. Deliver Date}}

 

this statement worked now. 

Joseph Chung Yin
Community Champion
August 10, 2022

Please click on Accept answer when you have a chance.  Thanks for your update.

Best, Joseph

0 votes
Muhammad Akram Sharifi
Contributor
August 10, 2022

@Joseph Chung Yin 

Here is the new question I have posted. 

Suggest an answer

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

Atlassian Community Events