-
-
Notifications
You must be signed in to change notification settings - Fork 786
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
[14.0][FIX] project_milestone : Wrong assignment of tasks to milestones when duplicating a project #1283 #1284
Conversation
Hi @patrickrwilson, |
@OCA/project-maintainers : Here is a fix for issue #1283 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review, LGTM.
I wonder if there's a more robust way of finding the milestone instead of using the name. Maybe instead of copy=True
the milestones could be copied "manually" inside the copy
function, in order to have a mapping between old and new milestones.
milestone = project.milestone_ids.filtered( | ||
lambda milestone: "2" not in milestone.name | ||
) | ||
assert tasks[0].milestone_id == milestone and tasks[1].milestone_id == milestone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chore (non-blocking): would prefer the usage of self.assertTrue
or similar instead of the raw assert
@OCA/project-service-maintainers : Thank you for your review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How test fixes the assignment on project duplication?
Missed other commits, disregard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Hello @abenzbiria , the pre-commit is currently failing. Could you have a look a it? |
@majouda Can you look at the pre-commit? |
The precommit is good now @leemannd @OCA/project-service-maintainers Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash your commits
…es when duplicating a project OCA#1283 [14.0][FIX] project_milestone : Wrong assignment of tasks to milestones when duplicating a project OCA#1283 [14.0][FIX] project_milestone : Wrong assignment of tasks to milestones when duplicating a project OCA#1283 [14.0][FIX] project_milestone : Wrong assignment of tasks to milestones when duplicating a project OCA#1283 [14.0][FIX] project_milestone : Wrong assignment of tasks to milestones when duplicating a project OCA#1283 Update test_project_milestone.py Update test_project_milestone.py
HI @OCA/project-service-maintainers , @dreispt I squached my commits . Thanks for your review |
@OCA/project-service-maintainers : Hello! We think that everything is ok in the PR. Can one of you revised it and merge it? |
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at cc5f9c0. Thanks a lot for contributing to OCA. ❤️ |
Fix for issue #1283