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

Port UserGroup to Use Eloquent Model #10506

Open
Hafsa-Naeem opened this issue Oct 4, 2024 · 2 comments
Open

Port UserGroup to Use Eloquent Model #10506

Hafsa-Naeem opened this issue Oct 4, 2024 · 2 comments
Assignees
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks. Housekeeping:2:Urgent Any dependency management or refactor that must be done soon to fix or avoid a significant problem.
Milestone

Comments

@Hafsa-Naeem
Copy link
Contributor

Issue Description

The current implementation of the UserGroup does not utilize Eloquent. This limitation makes it hard to manage relationships, run complex queries efficiently and perform eager loading, especially when adding new fields to the Submission API (Issue #10480)

Proposed Solution

Refactor UserGroup class to use Eloquent Model and define appropriate Eloquent relationships. This will enable the use of eager loading (StageAssignment::with('userGroup')) to optimize data retrieval, reduce the number of database queries, and ensure accurate computation of the additional fields required for the Submission API.

@Hafsa-Naeem Hafsa-Naeem added the Accessibility Any issue that impacts assistive technology or users with visual or physical impairments. label Oct 4, 2024
@Hafsa-Naeem Hafsa-Naeem self-assigned this Oct 4, 2024
@Hafsa-Naeem Hafsa-Naeem added Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks. and removed Accessibility Any issue that impacts assistive technology or users with visual or physical impairments. labels Oct 4, 2024
@jardakotesovec jardakotesovec added this to the 3.5.0 LTS milestone Oct 7, 2024
@Vitaliy-1 Vitaliy-1 added the Housekeeping:2:Urgent Any dependency management or refactor that must be done soon to fix or avoid a significant problem. label Oct 10, 2024
Hafsa-Naeem added a commit to Hafsa-Naeem/pkp-lib that referenced this issue Oct 15, 2024
@Hafsa-Naeem
Copy link
Contributor Author

@Vitaliy-1 I've submitted a draft PR as discussed in the meeting. Could you please review it and share your feedback so I continue with the commits for usage and migrations?
pkp/pkp-lib pkp/pkp-lib#10506 Refactor UserGroup to use Eloquent #10519

Hafsa-Naeem added a commit to Hafsa-Naeem/pkp-lib that referenced this issue Oct 28, 2024
Hafsa-Naeem added a commit to Hafsa-Naeem/ojs that referenced this issue Oct 28, 2024
@Hafsa-Naeem
Copy link
Contributor Author

@Vitaliy-1 I've made changes according to our discussion in the meeting and also updated usage part.
pkp/pkp-lib pkp/pkp-lib#10506 Refactor UserGroup to use Eloquent #10519

Hafsa-Naeem added a commit to Hafsa-Naeem/pkp-lib that referenced this issue Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks. Housekeeping:2:Urgent Any dependency management or refactor that must be done soon to fix or avoid a significant problem.
Projects
None yet
Development

No branches or pull requests

3 participants