Hi!
I've been trying to update my Jira issue with worklog through REST API. I have tried several solutions without success.
I.e.
jira.update(fields={"worklog":[{"add":{"timeSpent":"2h","started":"2019-01-23T21:00:01+02:00","comment":"x"}}]})
or
jira.update(fields={"worklog":{"timeSpent":"5m","started":"2019-01-23T21:00:01+02:00","comment":"x"}})
But all of them is giving an exception: "text: Field 'worklog' cannot be set. It is not on the appropriate screen, or unknown."
Thanks for your help in advance!
@Simo Nieminen As the error suggests, you may be using the wrong field name or the field itself is not present on the Create, Edit and View screens of your JIRA project.
AS far as I remember, the field name should be "Log Work" that is to be added to project screens as well as used in your JIRA REST API request.
Thanks! I found the solution from here:
https://media.readthedocs.org/pdf/jira/stable/jira.pdf
So...
jira.add_worklog(issue, '5h', None, None, None, None, 'comment', None, None)
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.