Skip to content

[18.0][ADD] project_task_default_user#1556

Open
NICO-SOLUTIONS wants to merge 1 commit intoOCA:18.0from
NICO-SOLUTIONS:18.0-add_project_task_default_user
Open

[18.0][ADD] project_task_default_user#1556
NICO-SOLUTIONS wants to merge 1 commit intoOCA:18.0from
NICO-SOLUTIONS:18.0-add_project_task_default_user

Conversation

@NICO-SOLUTIONS
Copy link
Copy Markdown
Member

@NICO-SOLUTIONS NICO-SOLUTIONS commented Aug 24, 2025

This module automatically assigns default users to tasks:

  • Stage-based (priority rule): When creating a task or changing its stage to one with default users, stage users are applied with a configurable assignment mode (replace or merge). Stage defaults always take priority over project defaults.
  • Project-based fallback: If the stage does not define any default users, project default users are applied with the same assignment mode logic.
  • Assignment behavior:
    • replace: replaces existing task users with default users
    • merge: adds default users to existing task users without removing them
  • Multiple default users can be configured on both projects and stages.

P.S.: I was a bit surprised I couldn't find anything about this already, so I made this module. If something similar exists, please let me know.

@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch from 1299c2c to 9283b5f Compare August 24, 2025 14:26
@NICO-SOLUTIONS NICO-SOLUTIONS changed the title [ADD] project_task_default_user [18.0][ADD] project_task_default_user Aug 24, 2025
@NICO-SOLUTIONS NICO-SOLUTIONS marked this pull request as ready for review August 24, 2025 14:35
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch 2 times, most recently from 722aff7 to d2de8e5 Compare August 27, 2025 15:04
@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 28, 2025
@NICO-SOLUTIONS
Copy link
Copy Markdown
Member Author

@leemannd
hey. could you please remove the stale tag? that would be great!

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 4, 2026
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch from d2de8e5 to 8f2a6a1 Compare January 4, 2026 12:39
Copy link
Copy Markdown
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution, nice and clean module. The logic is straightforward and tests cover the main scenarios well. Just left a couple of minor suggestions below.

Comment thread project_task_default_user/__manifest__.py
Comment thread project_task_default_user/models/project_task.py
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch from 8f2a6a1 to f6362bb Compare March 1, 2026 17:21
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch 5 times, most recently from 7c0bc04 to 6c47e56 Compare April 6, 2026 12:33
@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Copy Markdown

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM, just some code suggestions

Comment thread project_task_default_user/models/project_task.py Outdated
Comment thread project_task_default_user/models/project_task.py Outdated
Comment thread project_task_default_user/models/project_task.py
Comment thread project_task_default_user/models/project_task.py Outdated
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch from 6c47e56 to c40992d Compare April 22, 2026 09:25
@OCA-git-bot OCA-git-bot added series:18.0 mod:project_task_default_user Module project_task_default_user labels Apr 22, 2026
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch 2 times, most recently from 70699ec to f96b7b1 Compare April 22, 2026 13:37
@NICO-SOLUTIONS
Copy link
Copy Markdown
Member Author

@AaronHForgeFlow
I added project_task_assignment_mode and stage_task_assignment_mode to control whether default users are replaced or merged with existing task users.
Also refactored the method structure, adapted the test suite, and updated the README accordingly.

Could you please add another review when you have time?

This module automatically assigns default users to tasks:
- Stage-based (priority rule): When creating a task or changing its stage to one with default users, stage users are applied with a configurable assignment mode (replace or merge). Stage defaults always take priority over project defaults.
- Project-based fallback: If the stage does not define any default users, project default users are applied with the same assignment mode logic.
- Assignment behavior:
  - replace: replaces existing task users with default users
  - merge: adds default users to existing task users without removing them
- Multiple default users can be configured on both projects and stages.
@NICO-SOLUTIONS NICO-SOLUTIONS force-pushed the 18.0-add_project_task_default_user branch from f96b7b1 to 5746024 Compare April 22, 2026 13:52
Copy link
Copy Markdown

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Thanks! Code review LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants