Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How change 'assignee' field on ticket use Python without web.. ?

Dixie September 27, 2019

Hy, im start learning Python and try make small program for help me.

Use this page https://atlassian-python-api.readthedocs.io/en/latest/service_desk.html

but i dont see there how i can change any params on ticket what i can 'get', how i can 'set' what i need use only Python ? 

This code work and give me answer with all ticket in sd, i can take one ticket and change field 'assignee' ? ?   Ty for answer

1 [C__Users_PashkoRA_PycharmProjects_1] - ..._Start.py - PyCharm 2019-09-27 20.44.18.png

I take data from ticket:
'key':
'fields':
'issuetype':
'id':
'description':
...
'assignee': <--- How change this field use Python and do not change any other field in ticket?

3 answers

0 votes
Ian Wilkerson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 30, 2021

Hello, 

 

If anyone ever came up with a working solution for this could you please share? I have not used Python in a few years so I am very rusty but I am trying to accomplish the same thing as the above post. I tried each solution on this page but am having some issues. 

The main issue I am running into is even after installing the Atlassian package it still shows there is no module named Atlassian for this script to use. If I try to install the ServiceDesk module through pycharm it fails each time. Has anyone found a work around for this?

Sorry this may be a dumb question, I'm just getting back into this and need a little guidance. 

 

Thank you!

0 votes
Dixie September 28, 2019
fields = {'assignee': 'username=biliBoy'}
sd.update_issue_field('ITM-14698', fields)

Oh thx for help me, can you show exemple how it work ?  I try use this code but, that not work, i think this is my fault, mb write wrong fields  

no errors, but any change in ticket 


Thanks 

jira guy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2019

just provide 'biliBoy'. get rid of 'username=' from the above code

Dixie September 30, 2019

yeah i try... 

fields = {'assignee': 'biliBoy'}
d.update_issue_field('ITM-14698', fields)

This is not work too.. 

I open this file: ServiceDesk

import ServiceDesk

 and find method 'update_issue_field' and what i find ? Empy method... 

111111.png

Other method's from this file: 

2222.png

I think this 'update_issue_field' not working because empty... When i ask this method and give him issue key, he not have link where need go to find this issue like a '

self.get('rest/servicedeskapi/request/{}/comment/{}'.format(issue_id_or_key,
comment_id))

sad ^(

0 votes
jira guy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2019
fields = {'assignee': 'username'}
sd.update_issue_field(issuekey, fields)
Dixie September 29, 2019

can some one show, how it work ? i cant find any information about update_issue_field, any exemple on google.... =/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events