Hi Guys,
Code:-
issue=jira.issue('DWO-24576')
issue.update(assignee={'name': 'username'})
print issue.fields.customfield_10130
tag = ["opsfix,production_failure"]
issue.update(fields={'customfield_10130':tag})
issue.update(fields={'aggregatetimespent':'.5h'})
#issue.update(fields={'status':'Closed'})
jira.transition_issue(issue,'51')
While running script, I am getting below error
response text = {"errorMessages":[],"errors":{"aggregatetimespent":"Field 'aggregatetimespent' cannot be set. It is not on the appropriate screen, or unknown."}}
Please suggest on this.
Hi Himanshu,
aggregatetimespent isn't a field that can be updated or set through the REST API, which is why you're receiving the error. The value of this field is set by Jira by adding up the worklog entries in seconds. If you want to update the aggregatetimespent value, you'd want to log work on the affected ticket. You are able to retrieve the value of this field though. This could be done by adding a simple print function to the code for the sake of example.
print issue.fields.aggregatetimespent
Hope that helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, want to update error category but getting error
Code :-
Error_type = ["Test Error"]
issue.update(fields={'customfield_15526': Error_type})
Error :-
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://jira.corp.shutterfly.com/rest/api/2/issue/2381618
text: expected Object
response text = {"errorMessages":[],"errors":{"Error Category":"expected Object"}}
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.
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.