Skip to content

add_watcher should accept a user ID, as per Jira API #1855

@supermitch

Description

@supermitch

Problem trying to solve

I noticed that in version 3.5.x, the new Jira cloud (and this package) required a user ID to add watchers.
See https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-watchers/#api-rest-api-3-issue-issueidorkey-watchers-post

However, in #1682, someone added the (very useful) ability to once again add watchers by email addresses. However, they:

  1. Added an extra API call
  2. Broke consistency with the API docs

Possible solution(s)

Please update the method and documentation so we can pass either an email address or an accountId, if we already have it.

Alternatives

  • Alternatively, I would revert the functionality to be more in-line with the REST API.
  • Alternatively, update the documentation to be more explicit, stating that a user search is being conducted internally.

Additional Context

Source: https://jira.readthedocs.io/_modules/jira/client.html#JIRA.add_watcher

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions