Hello,
I have created an automation to populate the field "Date Closed" with {{now}} when an item moves to Done status. We want to receive an email when the Date Closed is amended by a user but the automation I have written sends this email when an issue is initially transitioned to Done status (which I don't want) but is correctly sending the email when I manually change the Date Closed field. See first screenshot.
Additionally, we want the date to be in the format of October 29, 2024 rather than 29/Oct/24 (see 2nd screenshot). Here is the smart value text I use to generate the email in the screenshot:
The Date Closed on {{issue.key}}, {{issue.summary}} has changed from {{changelog.Date Closed.fromstring}} to {{changelog.Date Closed.tostring}}.
Thank you!
From what you describe, your first rule triggered on Issue Transition is triggering the other rule when the field is updated.
Please check the details at the top of the rule triggered on the field change as you likely have this option selected / checked and it should not be:
Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.
Next to format the date, you may use the built-in formats or use the format() function for other layouts: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-format---
Kind regards,
Bill
Hi Bill,
Thanks for your reply! I unchecked the box on the transition automation and I'm still having the same result where the Date Closed field is empty then I populate with a date but receive an email - see screenshots.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you want to uncheck the option on the rule triggered on Value Changes for Date Closed.
By the way, that option is disabled by default to prevent looping and other race-track errors. It is normally only enabled when you specifically want one rule to trigger another.
I recommend reviewing your rules to understand why it was enabled in both rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
This seems to be working correctly! Thank you!
For the date, I would want to use longDate and tried to plug this into the smart value but it's not working. The automation currently reads:
The Date Closed on <a href="{{issue.url}}">{{issue.key}}</a>, {{issue.summary}} has changed from {{changelog.Date Closed.fromstring}} to {{changelog.Date Closed.tostring}}.
I tried putting longDate in various places within the smart values but no dice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
When using the changelog smart values of fromString and toString, those are text. To use the date formatting they must be converted back into a date type first. For example:
{{changelog.Date Closed.fromString.toDate.longDate}}
Please let me know if that works for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
This worked! Thank you. Is there a way to state the date the item changed to? For example, the item below changed from October 29, 2024 to October 14, 2024. The "to" component would need to be added.
The Date Closed on RCM-4896, TX Disaster Proclamation Dated 10-16-2024 RE E. Coli in Public Water System in Webb County has changed from October 29, 2024.
I currently have the automation written as: The Date Closed on <a href="{{issue.url}}">{{issue.key}}</a>, {{issue.summary}} has changed from {{changelog.Date Closed.fromString.toDate.longDate}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.