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 issue with update_time_lost being called on jira tickets that doesn't have a time lost defined #282

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

sebastian-aranda
Copy link
Contributor

This PR includes updates to the update_time_lost functionality and adds a new test case to ensure proper handling when the time_lost field is None for jira tickets that have not set that field.

Updates to update_time_lost functionality:

  • manager/manager/utils.py: Modified the update_time_lost function to handle cases where the time_lost field is None by checking the value before converting it to a float.

New test case:

  • manager/api/tests/test_jira.py: Added a new test test_update_current_time_lost_none to verify that the update_time_lost function correctly updates the time_lost field when it is initially None.

Copy link
Contributor

@Vebop Vebop left a comment

Choose a reason for hiding this comment

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

I see how an error could happen with returning None instead of 0.0 with the original code. Good fix.

@sebastian-aranda sebastian-aranda merged commit 0643cf1 into develop Sep 27, 2024
2 checks passed
@sebastian-aranda sebastian-aranda deleted the tickets/DM-46536 branch September 27, 2024 19:04
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