Hi all,
I am trying to automate versions in JIRA via the REST API, in a bash script as a part of our pipeline, but for some reason the requests keep failing on the releaseDate and userReleaseDate. releaseDate returns "Error parsing date string" and for some strange reason userReleaseDate doesnt like the format given in the documentation.
Does anyone know how to resolve this?
Thanks,
Alex
P.S.
$
releaseDate=`date +%Y/%m/%d`
stringify=$releaseDate
["Unable to unmarshal (to type [simple type, class java.lang.String]): Error parsing date string: {{$releaseDate}} (through ref
erence chain: com.atlassian.jira.rest.v2.issue.version.VersionBean[\"releaseDate\"])"]
userReleaseDate=`date +%d/%b/%y`
stringify=$userReleaseDate
{"errorMessages":[],"errors":{"releaseDate":"Please enter the date in the following format: d/MMM/yy"}}
-d '{
"description": "{{jiraDescription}}",
"name": "{{$jiraName}}",
"archived": false, "
released": false,
"userReleaseDate": "{{$userReleaseDate}}",
"project": "FOO",
"projectId": 1234}'
}'
The date input format is probably wrong.
Check the response from Atlassian here on a similar question
Hi Alex,
Could you please paste a sample of the date string you are passing in json body?
Regards,
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was just thinking that as I posted the question. Added snippets of code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
Please use the format for releaseDate same as you have used for userReleaseDate as this is the correct format seems to me.
releaseDate=`date +%d/%b/%y`
stringify=$releaseDate
Regards,
Rakesh
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.