How to assign a test id in jira-python

I want to assign the full test name when I create an issue. In the jira-python documentation under the fields dictionary they list:

project: {'key': 'PROJ-KEY'}

project: {'id': PROJ-ID}   (where proj id is an int

project:{'name': 'PROJ-NAME'}

For some reason, only the 'key' keyword seems to work for me, but it randomly assigns a number to the test. For example, if I enter:

project:{'key': 'PROJ-KEY'}

Then the created issue will have the name 'PROJ-KEY-randomnumber', so say that my PROJ-KEY is STAR, the issue will be named:

STAR-7571

I'd like to designate what that the full name would be so that if I want the issue to be named STAR-123, I can do that through the jira-python api by using the 'id' or 'name' keys. I want to have tighter control over the issue creating so that I don't keep creating the same issue unnecessarily. 

Please let me know if I can make this any clearer. Thanks!

1 answer

1 accepted

This widget could not be displayed.
Shaun Seaver Atlassian Team Jul 31, 2017

Alex,

 

If I understand correctly, you're wanting to use the python-JIRA library to explicitly set the issue key to a specific number?  If that's correct, this currently isn't something that can be dictated by the user. When an issue is created via python, REST, or web interface JIRA assigns the issue key number sequentially to the issue.  If the last created issue in a project is EXAMPLE-255, the next issue created in that project would automatically be assigned EXAMPLE-256. Am I correct in what you're trying to accomplish?

Yes that is the idea. Thanks for answering.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

269 views 5 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you