jira icon indicating copy to clipboard operation
jira copied to clipboard

parameter template_name is ignored in create_project method

Open KLaMaCH opened this issue 3 years ago • 0 comments

Bug summary

The HTTP request payload use the template_key variable which is not a parameter: https://github.com/pycontribs/jira/blob/fdebf2e1ff006413c1ef2ee73d7252ccf4d9a4c9/jira/client.py#L4384

The template_key variable will be defined only if template_name is none: https://github.com/pycontribs/jira/blob/fdebf2e1ff006413c1ef2ee73d7252ccf4d9a4c9/jira/client.py#L4317-L4323

Thus if I call create_project() method with any template_name the project will be created without a template.

Is there an existing issue for this?

  • [X] I have searched the existing issues

Jira Instance type

Jira Cloud (Hosted by Atlassian)

Jira instance version

No response

jira-python version

3.3.2

Python Interpreter version

3.10

Which operating systems have you used?

  • [X] Linux
  • [x] macOS
  • [X] Windows

Reproduction steps

jira.create_project(
            'PK',
            template_name='com.pyxis.greenhopper.jira:gh-simplified-scrum-classic'
)

Stack trace

payload = {'name': 'PK', 'key': 'PK', 'projectTypeKey': 'software', 'projectTemplateKey': None, 'leadAccountId': '5ad724c3e378d62b3bb41132', 'assigneeType': 'PROJECT_LEAD', 'description': '', 'permissionScheme': 0, 'notificationScheme': 10000, 'url': '', 'issueSecurityScheme': 10000}

Expected behaviour

Project created with the particular template

Additional Context

No response

KLaMaCH avatar Aug 12 '22 10:08 KLaMaCH