Skip to content

Fix AttributeError in set_jira_fields when target_end is already set - #528

Merged
antbob merged 1 commit into
packit:mainfrom
antbob:jira_target_end
Jun 1, 2026
Merged

antbob merged 1 commit into
packit:mainfrom
antbob:jira_target_end

Conversation

@antbob

@antbob antbob commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Quick one-liner fix for when target_end is already set. JIRA returns target_end as a plain date string, not a dict, so .get("value") fails. Changed the check to if not current_target_end and fixed the related tests. I've noticed the failure traces related to this in our MCP gateway logs and while it doesnt seem to affect anything badly it would still be better to have this fixed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the check for the TARGET_END_CUSTOM_FIELD field in the Jira tool and updates the corresponding unit tests to handle cases where no fields need updating. The review feedback suggests improving the unit tests by explicitly asserting whether the PUT request mock is called or not using flexmock's expectations.

Comment thread ymir/tools/privileged/tests/unit/test_jira.py
@antbob
antbob merged commit b977525 into packit:main Jun 1, 2026
9 checks passed
@qodo-for-packit qodo-for-packit Bot mentioned this pull request Aug 3, 2026
3 tasks done
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