Hi all,
I'm currently having trouble when configuring an automation rule. Kindly see the below details:
Version: Jira Data and Center 5.11.2
In an issue type, I have a custom field named Incident Fixed (Date Time Picker Type). For this field, I want only users with project role Administrator can edit it, other users are not allowed to edit.
I researched and discovered an automation rule to revert to previous value which could be helpful, following the documentation https://confluence.atlassian.com/jirakb/how-to-prevent-or-revert-field-changes-using-automation-rules-in-jira-1188424037.html
Here's how I configure:
Here's my custom field:
I succeed in keeping the value inputted by role Administrators. However, for other project roles, value is not reverted. For example:
- Current value for Incident Fixed is 25/Dec/23 12:00AM.
- If I'm an Incident Manager project role, I edit the field to 26/Dec/23 12:00AM, then that is the latest value, while it should revert to 25/Dec/23 12:00AM.
I checked the audit log of automation rule and got below error.
I'm not sure what "error parsing time" is. Please assist to help me to solve this error.
Thanks all!
Hi @Kaitlyn Vu -- Welcome to the Atlassian Community!
First thing, I am using Jira Cloud and not the Data Center version. And so my answer is based on what I know of automation rules. Please test what I suggest with your version of Jira. Thanks!
In your rule you are using the {{fromString}} smart value for the field, and it appears the text cannot be parsed correctly as a date / time: https://confluence.atlassian.com/automation/smart-values-993924860.html#Jirasmartvaluesissues-fieldChangefieldChange
There are two things you could try:
Kind regards,
Bill
Hi @Bill Sheboy
I tried with Option 1 and it worked!!!! Your provided documentation links are really helpful. Appreciate it!!!
Thank you very much! Have a nice day!
Best Regards,
Kaitlyn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy Sorry to trouble you again.
Thanks to your instructions before, I've used smart value {{fieldChange.fromString.toDate}}. However, as our team tested today, it seems that it only works with Date. The time is reverted incorrectly.
For details:
Could you help to support me on solving this issue? Should this relate to timezone settings?
I'd really appreciate your help. Hope to hear from you soon.
Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Kaitlyn!
That appears to be time zone related. When you convert the text using toDate() that could be followed by a set (or convert) of the time zone. Please look here to find those functions for your version of Jira: https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html
I recommend writing the values to the audit log incrementally to confirm they work as expected while trying to address this one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another solution for the parsing time error while setting date/time picker custom field on a webhook response by using "toDate" and "jiraDateTime".
example:
{{webhookResponse.body.result.start_date.toDate("yyyy-MM-dd HH:mm:ss").jiraDateTime}}
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.