Hi Team,
I am trying to create a change ticket using JIRA API with python script. When I am passing the field "Scheduled execution date"(cf 18901), I unable to create one. It throwing me error as below.
"Failed. Status code: 400, Response: {"errorMessages":[],"errors":{"customfield_18901":"Error parsing time: 2025-05-15 2:20"}}"
Could someone please help me with this field which format I should use.
Thank you!!
Hi @First Last
Jira expects the correct time format, including the seconds and milliseconds, even if optional in the UI.
so you have to change
"customfield_18901": "2025-05-17T15:56:03"
to
"customfield_18901": "2025-05-17T15:56:03.000"
or if you're dynamically formatting the value in Python, something like the below:
scheduled_date = datetime(2025, 5, 17, 15, 56, 3)
formatted_date = scheduled_date.strftime("%Y-%m-%dT%H:%M:%S.000")
if the field is a Date (not DateTime) in that case you'd just use 2025-05-17
Thanks for the suggestion,
Could you please help me with this field as well.
"customfiled_10400": {"value": "Myname"}
"customfiled_10400": "Myname"
I tried in both ways but it did not helped me. Please help me with this as well.
The field is for "RM Coordinator"
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.
then "customfiled_10400": "Myname" should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome @First Last
For this custom field what is the content of the body for this request? Which endpoint are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"fields": {
"project": {"key": "CHGMGMT"},
"summary": "Test",
"description": "Test",
"issuetype": {"name": "Operations Change Request"},
"customfield_21901": {"value": "Risk = 1, Impact = 1"}, ##risk and impactlevels
"customfield_29200": {"value": "Infrastructure"}, ##servicezone
"customfield_11902": {"value": "After Business Hours"}, ##Deploymentwindow
"customfield_16002": {"value": "production"}, ##Environment
"customfield_31801": {"value": "Test"}, ## service registry component
"duedate": "2025-05-15",
"customfield_18901": "2025-05-17T15:56:03", #Scheduled-Execution
"customfield_17000": "Test",
"customfield_15000": "Test",
"customfield_12604": "NA",
"customfield_16600": "Test",
#"customfiled_10400": "Test"
}
Using the rest API:
https://atlassian.spscommerce.com/rest/api/2/issue/
customfield_18901 defines Scheduled execution date/time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try using a format like this: "customfield_20000": "06/Jul/19 3:25 PM"
Replace this ID with your custom field ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, will use this format
Could you please help me with this field as well.
"customfiled_10400": {"value": "Myname"}
"customfiled_10400": "Myname"
I tried in both ways but it did not helped me. Please help me with this as well.
Thank you!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @First Last
What is the type of that custom field? Pragraph, radio button, multi select, single select, etc?
For this, try with this format:
"customfield_10400": { "content": [ { "content": [ { "text": "My name" } ]
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.