Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use field translation in Jira.issue method #1864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Wojtini
Copy link

@Wojtini Wojtini commented May 28, 2024

Fields param in issue are untranslated so if you use custom_field's name instead of id Jira API won't return it. Those changes are supposed to fix that.

Changes:

  1. Extracted translation part to seperate methods
  2. Changed variable names to be less abraviated
  3. Reused those methods in Issue method
  4. Missing tests for limiting fields on Issue method
  5. Seperate tests for translation (Added duedate field to test issue)

@Wojtini Wojtini changed the title Use field translation in Jira.issue method Draft: Use field translation in Jira.issue method May 29, 2024
@Wojtini Wojtini changed the title Draft: Use field translation in Jira.issue method fix: Use field translation in Jira.issue method May 29, 2024
jira/client.py Outdated
Comment on lines 3611 to 3612
if not translation_map:
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to move this out of a staticmethod and instead have a cache of the the translation_map inside the class instance? ie similar to what is done with the self._field_cache ?

Copy link

github-actions bot commented Sep 2, 2024

Label error. Requires exactly 1 of: bug, enhancement, major, minor, patch, skip-changelog. Found:

@Wojtini Wojtini force-pushed the wojtini_fix_get_issue_customfields branch from 77f3aa9 to 8ad5bc6 Compare September 2, 2024 15:00
@Wojtini Wojtini force-pushed the wojtini_fix_get_issue_customfields branch from b304904 to 10afa59 Compare September 2, 2024 15:15
@Wojtini Wojtini marked this pull request as draft September 2, 2024 15:20
@Wojtini Wojtini force-pushed the wojtini_fix_get_issue_customfields branch from f977b18 to 10afa59 Compare September 2, 2024 15:21
@Wojtini Wojtini force-pushed the wojtini_fix_get_issue_customfields branch from be0f572 to 8ad5bc6 Compare September 2, 2024 15:25
@Wojtini Wojtini force-pushed the wojtini_fix_get_issue_customfields branch from b10d222 to 8ad5bc6 Compare September 2, 2024 15:31
@Wojtini Wojtini closed this Sep 2, 2024
@Wojtini Wojtini force-pushed the wojtini_fix_get_issue_customfields branch from 8ad5bc6 to eb0ec90 Compare September 2, 2024 15:31
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.

2 participants