Dear Community,
I try to update an Asset Object via Automation (provided by Scriptrunner).
In
I don't know the right format for date array in json. Can you please help?
{
"objectKey": {{issue.customfield_19103.key.asJsonString}},
"Submission Date": {{issue.customfield_16512.date.asJsonArray}}
}
Best regards-,
Nicole
From the configuration you have shared, I suspect this will not work.
Currently, you are passing the value into the Submission Date attribute as an array, i.e.:-
"Submission Date": {{issue.customfield_16512.date.asJsonArray}}
Could you please try to modify your configuration to a String, i.e.:-
{
"objectKey": {{issue.customfield_19103.key.asJsonString}},
"Submission Date": {{issue.customfield_16512.date.asJsonString}}
}
And see if it works.
I am looking forward to your feedback.
Thank you and Kind regards,
Ram
Hi @Ram Kumar Aravindakshan _Adaptavist_
Thanks for the effort. With string the same error message appears:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the error message returned it seems that an empty value is entered in the Submission Date.
Could not parse input as JSON. Input after smart values applied was: '{ "objectKey": "NXSPCRM-236126", "Submission Date": }'
Please confirm if the value is entered for the submission date.
It would be helpful if you could share a screenshot of the date field you are trying to pass and also the structure of your Asset object.
You also asked:-
Is there any issue in regards of the Timing unit?In Asset we have dd.mm.yy and in Jira we have dd.mm.yyyyCould this be point?
This could also be possible. It would be good to set the format in the Asset date to match your Jira date format and retest it.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Ram Kumar Aravindakshan _Adaptavist_
I fixed this
{
"objectKey": {{issue.customfield_19103.key.asJsonString}},
"Submission Date": "{{issue.fields.customfield_16512}}"
}
Thanks for the help.
Nicole
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.