pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.94k stars 860 forks source link

create_filter() to support permissions #1629

Open sathishsms opened 1 year ago

sathishsms commented 1 year ago

Bug summary

Pls add support for this https://docs.atlassian.com/software/jira/docs/api/REST/9.3.1/#api/2/filter-addSharePermission

permissions = [
        {
            "type": "group",
            "groupname": "Engineering",
            "view": True,
            "edit": True,

response = requests.post(
            f"{url}/rest/api/2/filter/{filter_id}/permission",
            auth=auth,
            headers=headers,
            json=permission,
        )

        # Check the status code of the response
        if response.status_code == 201:
            current_app.logger.info(
                f"Filter permission updated successfully!
                  Status code: {response.status_code}, text: {response.text}"
            )
        else:
            current_app.logger.error(
                f"Error updating filter permission. Status
                  code: {response.status_code}, text: {response.text}"
            )

Need support for adding permission for the filters being created

Is there an existing issue for this?

Jira Instance type

Jira Cloud (Hosted by Atlassian)

Jira instance version

8.16.1

jira-python version

main

Python Interpreter version

3.10

Which operating systems have you used?

Reproduction steps

response = requests.post(
            f"{url}/rest/api/2/filter/{filter_id}/permission",
            auth=auth,
            headers=headers,
            json=permission,
        )

Stack trace

NA

Expected behaviour

NA

Additional Context

No response