Skip to content

let Jira cloud assign a default permissionScheme if none is specified #1483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4327,7 +4327,11 @@ def create_project(

ps_list: List[Dict[str, Any]]

if permissionScheme is None:
if permissionScheme is None and self._is_cloud:
# Let Jira Cloud decide the default field due to issues in handling the
# field. See https://bit.ly/3ALVqgo
Copy link
Collaborator

@studioj studioj Feb 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think many people will open a random bit.ly address in some comments. could you paste the full URL here? It might look slightly uglier but at least people won't open this in a burner VM like I did :-D

pass
elif permissionScheme is None:
ps_list = self.permissionschemes()
for sec in ps_list:
if sec["name"] == "Default Permission Scheme":
Expand Down Expand Up @@ -4430,12 +4434,13 @@ def create_project(
"assigneeType": "PROJECT_LEAD",
"description": "",
# "avatarId": 13946,
"permissionScheme": int(permissionScheme),
"notificationScheme": notificationScheme,
"url": url,
}
if issueSecurityScheme:
payload["issueSecurityScheme"] = int(issueSecurityScheme)
if permissionScheme is not None:
payload["permissionScheme"] = int(permissionScheme)
if projectCategory:
payload["categoryId"] = int(projectCategory)

Expand Down