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

[MIG] [17.0] project_task_personal_stage_auto_fold #1344

Open
wants to merge 23 commits into
base: 17.0
Choose a base branch
from

Conversation

nikul-serpentcs
Copy link
Member

No description provided.

Shide and others added 22 commits September 28, 2024 12:47
This module adds the behavior to change the Personal Stage of the task to the first Folded one when the task reachs an stage with "Mark as Done".
If the Personal Stage is already folded, does nothing.

Simplifies the behavior of closing a task, go back to Personal Stages and move it to the Pesonal Done stage.
Chooses Personal Stages with the same name before Closing stages or Folded stages.
Tests to ensure expected behaviour
…riginal test fail

By inheriting the tests of project module one of the test defined in the original module is failing,
by copying the setUpClass we avoid this error.
Currently translated at 100.0% (1 of 1 strings)

Translation: project-16.0/project-16.0-project_task_personal_stage_auto_fold
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_personal_stage_auto_fold/hr/
Currently translated at 100.0% (1 of 1 strings)

Translation: project-16.0/project-16.0-project_task_personal_stage_auto_fold
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_personal_stage_auto_fold/it/
Currently translated at 100.0% (1 of 1 strings)

Translation: project-16.0/project-16.0-project_task_personal_stage_auto_fold
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_personal_stage_auto_fold/pt_BR/
Currently translated at 100.0% (1 of 1 strings)

Translation: project-16.0/project-16.0-project_task_personal_stage_auto_fold
Translate-URL: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_personal_stage_auto_fold/es/
@nikul-serpentcs nikul-serpentcs mentioned this pull request Sep 28, 2024
28 tasks
@nikul-serpentcs nikul-serpentcs force-pushed the 17_mig_project_task_personal_stage_auto_fold branch from 8cebca3 to 154ea2f Compare September 28, 2024 07:45
@yvaucher
Copy link
Member

/ocabot migration project_task_personal_stage_auto_fold

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Sep 30, 2024
@@ -25,13 +30,12 @@ def _fold_personal_stage_task(self):
)
.sorted(lambda ptt: ptt.fold, reverse=True)
)
if not folded_stages:
return
Copy link

Choose a reason for hiding this comment

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

Is there always a folded stage?

# Allow to find personal stage with same name as shared stage
stage_by_name = {stage.name: stage for stage in folded_stages}
# Apply best matching personal stage
default_stage = folded_stages[0]
Copy link

Choose a reason for hiding this comment

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

This will fail when the user deleted all the folded stages, probably just return when no folded_stages are found

Suggested change
default_stage = folded_stages[0]
default_stage = folded_stages[0]

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.