7

So, I have written python code which interact with Jira api via python library atlassian_python_api

from atlassian import Jira

jira = Jira(
     url="https://jira.example.com/",
     username='gonchik.tsymzhitov',
     password='admin')

jira.issue_create(fields={
    'project': {'key': 'TEST'},
    'issuetype': {
        "name": "Task"
    },
     'summary': 'test rest',
     'description': 'rest rest',
})

After the issue has been created with key TEST-2045 (the number 2045 was generated automaticly).

The question is: How can I insert my own issue number? For example, TEST-15 ?

1
  • You cannot control that. Commented Nov 28, 2019 at 12:49

2 Answers 2

3

that's the 'key' field. and you can't provide it while creating jira issue, it's predefined behavior see the topic at atlassian forum: https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-specify-key-when-creating-issue-via-API/qaq-p/574472

Sign up to request clarification or add additional context in comments.

Comments

0

For those of you who might run into the error JIRA' object has no attribute 'issue_create':

it should be "jira.create_issue".

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.