Skip to content

Conversation

@amp-rh
Copy link
Collaborator

@amp-rh amp-rh commented Dec 3, 2025

Summary

Switch from username-based to accountId-based user identification to support Jira Cloud migration:

  • Use accountId for @mention syntax ([~accountId:...] format)
  • Compare comment authors by accountId instead of email
  • Add _get_user_account_id helper for safe accountId extraction
  • Add _get_user_email helper with None handling for Cloud privacy
  • Handle optional assignee_email (may be None in Cloud)

Includes 7 unit tests for the new helper methods.

Context

This PR is part of the Red Hat Jira Cloud migration effort tracked in INTEROP-8496.

Why these changes are needed

Jira Cloud uses accountId instead of username for user identification:

  • The [~username] mention syntax will silently fail in Cloud (no notification sent)
  • Email visibility may be restricted by user privacy settings (returns None)
  • Comment author comparisons by email will break

Changes made

File Change
src/escalation/jira_escalation.py accountId-based mentions and user comparison
tests/.../test_jira_escalation.py 7 new tests for helper methods

UAT Follow-up

The following should be verified during UAT against Jira Cloud:

  • assign_issue email lookup works in Cloud (src/objects/jira_base.py)
  • get_field("assignee") string output displays correctly in issue tables

Switch from username-based to accountId-based user identification
to support Jira Cloud migration:

- Use accountId for @mention syntax ([~accountId:...] format)
- Compare comment authors by accountId instead of email
- Add _get_user_account_id helper for safe accountId extraction
- Add _get_user_email helper with None handling for Cloud privacy
- Handle optional assignee_email (may be None in Cloud)

Includes 7 unit tests for the new helper methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant