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

fix: remove SQL Error when tobill field is displayed in task list #31358

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

FHenry
Copy link
Member

@FHenry FHenry commented Oct 11, 2024

fix: #31359

GROUP BY do not support t.field as aliasname

Requête dernier accès en base en erreur: SELECT DISTINCT p.rowid as projectid, p.ref as projectref, p.title as projecttitle, p.fk_statut as projectstatus, p.datee as projectdatee, p.fk_opp_status, p.public, p.fk_user_creat as projectusercreate, p.usage_bill_time, s.nom as name, s.name_alias as alias, s.rowid as socid, t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_modification, t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut as status, t.description, t.fk_task_parent, t.budget_amount , SUM(tt.element_duration * (CASE WHEN invoice_id IS NULL THEN 1 ELSE 0 END)) as tobill, SUM(tt.element_duration * (CASE WHEN invoice_id IS NULL THEN 0 ELSE 1 END)) as billed FROM llx_projet as p LEFT JOIN llx_societe as s on p.fk_soc = s.rowid, llx_projet_task as t LEFT JOIN llx_element_time as tt ON (tt.fk_element = t.rowid AND tt.elementtype = 'task') WHERE t.fk_projet = p.rowid AND p.entity IN (1) AND p.fk_statut = 1 GROUP BY p.rowid, p.ref, p.title, p.fk_statut, p.datee, p.fk_opp_status, p.public, p.fk_user_creat, s.nom, s.rowid, t.datec, t.dateo, t.datee, t.tms, t.rowid, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress,t.budget_amount, t.fk_statut as status ORDER BY p.ref DESC LIMIT 26
Code retour dernier accès en base en erreur: DB_ERROR_SYNTAX

@eldy eldy merged commit add1b28 into Dolibarr:20.0 Oct 11, 2024
6 of 7 checks passed
@FHenry FHenry deleted the 20_fix_task_list_with_tobill_displayed branch October 12, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants