I am trying to copy a date field value into a string field in automation. I was thinking I'd have the best luck using smart values.
customfield_10273 is a date field and customfield_10289 is a string field. I am trying to copy the date in 10273 into 10289 as a string.
I have tried:
{{issue.customfield_10273.value}}
{{issue.customfield_10273}}
{
"fields": {
"customfield_10289" : { "value": "{{issue.customfield_10273.value.asJsonString}}" }
}
}
Does anyone have any experience or suggestions for this?
Hi @Mya.Hauck
Would you please post an image of your rule as that will give the community context to offer ideas? Thanks!
If you are setting the text field with the date, you may want to use one of the date format functions to get the exact format you want: https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Two suggestions to try:
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So the screenshots here were just to show you all of the different ways I've tried to edit this field (advanced JSON and the normal "Edit Issue" action).
I have been testing all of these scenarios individually, never together so there's no overwriting going on.
This is the error I get when I try to edit the field with advanced editing: "RN-18 (Operation value must be a string (customfield_10289))"
And what it looks like when I try it with the normal "edit issue" action. Here it says success, but nothing is actually getting added to the field:
Again, I believe this is all happening because a date and a string are different types, and I need to figure out the syntax to translate the date into a string (if there is any).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rather than performing the edit, if you just write the value to the audit log what does it show? Trying that may reveal what is happening with the type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update: I was trying to do this with a hidden field (a field not on the screen)- turns out you can't do that. I got it working using the normal "Edit issue" action with "{{issue.customfield_10273.mediumDate}}" and put the field on the screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad you got this to work, and puzzled as that is a new symptom for that problem. Often that cause shows up as either a permission or unknown field error in the automation log. Quite curious.
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.