Hey, you can try returning the response to that 400 error to get a better understanding of what the error message says. That will help you to know what's really wrong.
print(res.json())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do the above in your code on a new line to see what the response is all about.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great thanks @Prince Nyeche, below are the error msg, seems the adjustEstimate is not supported
{'errorMessages': ['Unrecognized field "adjustEstimate" (Class com.atlassian.jira.issue.fields.rest.json.beans.WorklogJsonBean), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@cfc7291; line: 1, column: 41] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.WorklogJsonBean["adjustEstimate"])']}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Prince Nyeche Do you have more ideas about above error? Seems adjustEstimate is not supported, but this is not aligned with the API user guide for API2 https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-worklogs/#api-rest-api-2-issue-issueidorkey-worklog-post,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should not use adjustEstimate and newEstimate as body parameters. They should be used as query parameters instead accordingly to the documentation. Therefore, use it as parameters to your url variable.
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.