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

Automating User Group Assignment Based on Market Type Selection in Dolibarr #32883

Open
mehmetdogandev opened this issue Jan 31, 2025 · 0 comments
Labels
Feature request This is a feature request

Comments

@mehmetdogandev
Copy link

Feature Request

Description:
In Dolibarr, assigning users to appropriate market groups (e.g., Domestic Market or International Market) based on the selected Market Type is a crucial feature for businesses operating in multiple regions. Currently, this process requires manual intervention, which increases the risk of human error and inefficiency.

Problem Statement:
When creating or modifying a user in Dolibarr, there is no built-in functionality to automatically assign them to a corresponding user group based on their selected market type. This results in:

Extra manual work for administrators.
Potential misclassification of users.
Inconsistency in role-based permissions within different market categories.
Proposed Solution:
To enhance efficiency and reduce administrative overhead, we propose implementing an automated user group assignment mechanism. When a user selects a Market Type (e.g., Domestic Market or International Market), they should be automatically assigned to the relevant group in Dolibarr.

Implementation Options:
1️⃣ Database Trigger (Backend Approach)

A SQL trigger could be implemented to automatically update the llx_usergroup_user table when a user’s market type is updated.
2️⃣ Dolibarr Hooks (Native Integration Approach)

A new hook (e.g., formObjectOptions) could be added to listen for market type changes and dynamically assign users to the appropriate group.
3️⃣ AJAX-Based Automation (Frontend Approach)

Using JavaScript and AJAX, the system could instantly assign the user to a group upon selection without requiring a page refresh.
Business Impact:
✔ Time-saving: Eliminates repetitive manual work for administrators.
✔ Data Consistency: Ensures users are always correctly classified.
✔ Improved Permission Control: Automatically applies correct access rights based on market segmentation.
✔ Scalability: Supports businesses operating across multiple markets.

Request:
We request that the Dolibarr development team consider implementing this feature as a core functionality in future releases. This automation would greatly benefit companies that manage different market structures and streamline user management within Dolibarr.

Looking forward to your feedback and consideration! 🚀

Use case

No response

Suggested implementation

No response

Suggested steps

No response

@mehmetdogandev mehmetdogandev added the Feature request This is a feature request label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request This is a feature request
Projects
None yet
Development

No branches or pull requests

1 participant