Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Edited

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

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!

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 

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

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 ^(

fields = {'assignee': 'username'}
sd.update_issue_field(issuekey, fields)

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
Community showcase
Published in Jira Service Management

Next level incident management in Jira Service Management

Hello Atlassian Community! We’re thrilled to announce some exciting changes to incident management in Jira Service Management Cloud, in order to give your teams extra muscle during incidents, and ...

1,475 views 20 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you