patchback[bot] be4cf3ba4d [PR #11735/3e9689b1 backport][stable-12] jira - resolve Cloud assignee email to account ID via user search (#11891)
jira - resolve Cloud assignee email to account ID via user search (#11735)

* jira - resolve Cloud assignee email to account ID via user search

When cloud=true and assignee contains '@', look up a unique user with
GET /rest/api/2/user/search and use accountId for create, transition,
and edit. Document Jira Cloud vs Server/Data Center assignee behavior.

Fixes https://github.com/ansible-collections/community.general/issues/11734

Assisted-by AI: Claude 4.6 Opus (Anthropic) via Cursor IDE



* * Using urllib.parse.quote for URL encoding
* Adding "added in version" note for assignee when resolving account_id from email



* * Added cached variable 'user_email'
* Changed comparison to handle missing email safely
* Updated error message formatting to use repr-style values



* jira - adjust assignee and cloud descriptions (#11734)



* jira - resolve user-type field emails to account IDs on Jira Cloud (#11734)

When cloud=true, user-type fields (assignee, reporter, and any listed
in the new custom_user_fields parameter) that contain '@' are resolved
from email to Jira Cloud account ID via the user search API. Strings
without '@' are assumed to be account IDs. Add custom_user_fields
parameter for user to declare additional custom fields of user type.



* jira - address PR 11735 review (docs, assignee path, errors, naming)

- Clarify O(custom_user_fields): built-ins stay automatic; list extra
  user-typed fields without implying they are only custom-field IDs.
- On Jira Cloud, set assignee from the module param as a plain string and
  let resolve_user_fields() map it to accountId (including email lookup).
- Drop redundant ``or []`` when merging O(custom_user_fields) with the
  built-in user field list.
- Use public names USER_FIELDS, resolve_user_fields, and resolve_account_id
  (no leading underscore) per reviewer preference.
- Quote field name and email in resolution errors with explicit "…" text
  instead of repr-style !r, keeping values readable in failure messages.

Refs: https://github.com/ansible-collections/community.general/pull/11735

AI-assisted: Composer 2 (Anthropic) via Cursor IDE



* Changing fail_json formatting



* formatting fixes



* jira - fixing assignee as module option in description



---------


(cherry picked from commit 3e9689b13d)

Signed-off-by: Vladimir Vasilev <vvasilev@redhat.com>
Co-authored-by: vladi-k <53343355+vladi-k@users.noreply.github.com>
2026-04-20 09:36:05 +02:00
2026-03-23 21:24:48 +01:00
2026-03-23 21:24:48 +01:00
2020-03-09 09:11:07 +00:00
2025-03-29 12:17:36 +01:00

Community General Collection

Documentation Build Status EOL CI Nox CI Codecov REUSE status

This repository contains the community.general Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.

You can find documentation for this collection on the Ansible docs site.

Please note that this collection does not support Windows targets. Only connection plugins included in this collection might support Windows targets, and will explicitly mention that in their documentation if they do so.

Code of Conduct

We follow Ansible Code of Conduct in all our interactions within this project.

If you encounter abusive behavior violating the Ansible Code of Conduct, please refer to the policy violations section of the Code of Conduct for information on how to raise a complaint.

Communication

  • Join the Ansible forum:

    • Get Help: get help or help others. This is for questions about modules or plugins in the collection. Please add appropriate tags if you start new discussions.
    • Tag community-general: discuss the collection itself, instead of specific modules or plugins.
    • Social Spaces: gather and interact with fellow enthusiasts.
    • News & Announcements: track project-wide announcements including social events.
  • The Ansible Bullhorn newsletter: used to announce releases and important changes.

For more information about communication, see the Ansible communication guide.

Tested with Ansible

Tested with the current ansible-core 2.17, ansible-core 2.18, ansible-core 2.19, ansible-core 2.20, ansible-core 2.21 releases and the current development version of ansible-core. Ansible-core versions before 2.17.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.

External requirements

Some modules and plugins require external libraries. Please check the requirements for each plugin or module you use in the documentation to find out which requirements are needed.

Included content

Please check the included content on the Ansible Galaxy page for this collection or the documentation on the Ansible docs site.

Using this collection

This collection is shipped with the Ansible package. So if you have it installed, no more action is required.

If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from Ansible Galaxy manually with the ansible-galaxy command-line tool:

ansible-galaxy collection install community.general

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:

collections:
- name: community.general

Note that if you install the collection manually, it will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install community.general --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where X.Y.Z can be any available version:

ansible-galaxy collection install community.general:==X.Y.Z

See Ansible Using collections for more details.

Contributing to this collection

The content of this collection is made by good people just like you, a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors.

All types of contributions are very welcome.

You don't know how to start? Refer to our contribution guide!

The current maintainers are listed in the commit-rights.md file. If you have questions or need help, feel free to mention them in the proposals.

You can find more information in the developer guide for collections, and in the Ansible Community Guide.

Also for some notes specific to this collection see our CONTRIBUTING documentation.

Running tests

See here.

Collection maintenance

To learn how to maintain / become a maintainer of this collection, refer to:

It is necessary for maintainers of this collection to be subscribed to:

  • The collection itself (the Watch button → All Activity in the upper right corner of the repository's homepage).
  • The "Changes Impacting Collection Contributors and Maintainers" issue.

They also should be subscribed to Ansible's The Bullhorn newsletter.

Publishing New Version

See the Releasing guidelines to learn how to release this collection.

Release notes

See the changelog.

Roadmap

In general, we plan to release a major version every six months, and minor versions every two months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes.

See this issue for information on releasing, versioning, and deprecation.

More information

Licensing

This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.

See LICENSES/GPL-3.0-or-later.txt for the full text.

Parts of the collection are licensed under the BSD 2-Clause license and the MIT license.

All files have a machine readable SDPX-License-Identifier: comment denoting its respective license(s) or an equivalent entry in an accompanying .license file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in REUSE.toml. This conforms to the REUSE specification.

Description
Ansible Community General Collection
Readme 335 MiB
Languages
Python 99.4%
Shell 0.3%
HCL 0.2%