Skip to content

jira: Clarify assignee behavior for Jira Cloud and support email → account_id resolution #11734

@vladi-k

Description

@vladi-k

Summary

The documentation for the assignee parameter in the community.general.jira module is unclear for Jira Cloud users. The docs state:

Recent versions of JIRA no longer accept a user name as a user identifier.

This is ambiguous. In Jira Cloud, accountId is required, while Jira Server/Data Center still accepts usernames.

Expected Behavior
Documentation should clearly distinguish:

  • Jira Cloud requires account_id
  • Jira Server/Data Center supports username

Proposed Enhancement
When using Jira Cloud (cloud: true):

  1. If assignee is an email address
  2. Attempt to resolve it via /rest/api/2/user/search
  3. If exactly one user is returned, use its accountId

Notes
The lookup should fail safely if zero or multiple users are returned
This would simplify common automation use cases where only email is known

Issue Type

Feature Idea

Component Name

jira

Additional Information

Use Case
When creating issues via the module, users often only know the email address and must manually resolve accountId beforehand, which is inconvenient.

Example with this improvement:

- name: Assign an issue on Jira Cloud using email
  community.general.jira:
    uri: '{{ server }}'
    username: '{{ user }}'
    password: '{{ pass }}'
    issue: '{{ issue.meta.key }}'
    operation: edit
    cloud: true
    assignee: user@example.com

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue/PR relates to a feature requestmodulemodulepluginsplugin (any type)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions