-
Notifications
You must be signed in to change notification settings - Fork 0
Compléments v1.0 #22
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
Compléments v1.0 #22
Conversation
Merge pull request #19 from mapiolca/main
…eek-avec-multicompany feat: compatibilité Multicompany pour TimesheetWeek
Merge pull request #22 from mapiolca/main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."timesheet_week_line"; | ||
| $sql .= " WHERE fk_timesheet_week=".(int) $this->id; | ||
| // EN: Protect the fetch to ensure lines belong to an allowed entity scope. | ||
| // FR: Protège le chargement pour s'assurer que les lignes appartiennent à une entité autorisée. | ||
| $sql .= " AND entity IN (".getEntity('timesheetweek').")"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filtering lines by entity hides pre-existing data
The new fetchLines() clause now restricts rows to entity IN (getEntity('timesheetweek')). Prior to this commit, timesheet lines were inserted without filling the entity column (see previous code), so historical data created in another entity still carries the default value 1. After deployment, fetching a sheet from a shared entity will no longer load any of its existing lines and related actions (submit, totals, etc.) will fail because those rows are filtered out. A data migration or a backward‑compatible filter is needed before this check is applied.
Useful? React with 👍 / 👎.
No description provided.