ATM-Consulting / dolibarr_module_workstation

Gestion des postes de travail pour scrumboard et GPAO à terme
2 stars 12 forks source link

SQL breaks without extrafield needed_ressource for task, but this is created by the outdated gantt module #41

Open splohmer opened 1 year ago

splohmer commented 1 year ago

Hi,

in the current workstation.class.php (https://github.com/ATM-Consulting/dolibarr_module_workstation/blob/main/class/workstation.class.php) on line 245 is an sql query which uses the extrafield needed_ressource but this extrafield for task is created by the outdated gantt module. I am not sure how the best way is to solve this kind of dependency, maybe you can help me out here. Currently I see a few ways:

  1. create the extrafield by the module workstation itself, but in this module the field will never be set.
  2. remove the extrafield from the select and replace the following code (line 280, 281) so that $needed_ressource is removed as it would be set to 1 (as it is set to 1 if the data base entry is zero or lower).

Can you guide me the best approach here as the side effects are not clear to me. Thanks!

Regards, Sven