Files
helpdesk-tools/helpdesk_user_default_ticket_team/README.rst
Stéphan Sainléger a2b2256a17 [IMP] helpdesk_user_default_ticket_team: auto-assign team leader on team change
In helpdesk_mgmt v16, ``_compute_user_id`` automatically filled
``user_id`` with ``team_id.alias_user_id`` when the team was set and
no user was assigned. This behaviour was removed in v18: the compute
now only clears ``user_id`` when the assigned user is not a member of
the selected team, without assigning anyone in its place.

This commit restores equivalent behaviour using ``team_id.user_id``
(the Team Leader field) instead of ``alias_user_id``:

- When ``team_id`` changes and the current ``user_id`` is not a member
  of the new team, the Team Leader is assigned automatically.
- If the team has no leader configured, ``user_id`` is left unchanged
  to avoid creating unassigned tickets.
- ``super()`` is not called: this is a full replacement of the v18
  OCA behaviour, not an extension of it.

Also updates README.rst to document the new auto-assignment behaviour.
2026-06-12 16:29:33 +02:00

76 lines
2.2 KiB
ReStructuredText

=================================
helpdesk_user_default_ticket_team
=================================
Automate ticket team attribution when ticket created by portal user.
This module extends the ``helpdesk_mgmt`` module by allowing to configure a
default helpdesk team per user. It provides:
* A new ``default_helpdesk_ticket_team_id`` field on the user form, located in
the Preferences tab.
* Automatic team assignment when a ticket is created:
* If the ticket has no team assigned and has a linked partner.
* The module looks up the portal user associated with the partner.
* If the user has a default helpdesk team configured, it is automatically
assigned to the ticket.
* If the assigned team has a default project, the ticket is also linked to
that project.
* Automatic user assignment when a team is selected:
* When a team is set or changed on a ticket, if the current assigned user
is not a member of that team, the team leader (``team_id.user_id``) is
automatically assigned instead.
* If the team has no leader configured, the assigned user is left unchanged
(to avoid creating unassigned tickets).
This is particularly useful for multi-company or multi-team environments where
portal users should always have their tickets routed to a specific team.
Installation
============
Use Odoo normal module installation procedure to install
``helpdesk_user_default_ticket_team``.
This module depends on:
* ``helpdesk_mgmt``: provides the base helpdesk ticket functionality.
* ``helpdesk_mgmt_project``: provides the link between tickets and projects.
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://git.elabore.coop/Elabore/helpdesk-tools/issues>`_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Stéphan Sainléger - `Email <mailto:stephan.sainleger@elabore.coop>`_
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
Maintainer
----------
This module is maintained by Elabore.