View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - advices on implementing reserve management solution - Page 3 - ProjeQtOr

Prochaines Sessions

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)
 

13 mai 2025 (10h30-12h)

5 juin 2025 (16h-17h30)

 
 

Planifiez avec ProjeQtOr

14 et 15 mai 2025 (9h-12h30)

18 et 19 juin 2025 (9h-12h30)

 
 

Administrez avec ProjeQtOr

20 et 21 mai (9h-12h30)

25 et 26 juin (9h-12h30)

 

 

 

advices on implementing reserve management solution

More
28 Aoû 2013 19:48 - 28 Aoû 2013 19:55 #13 by babynus
Hi,

I found the fix.
Not easy to find :S

It is due to forcing of the ID (I really never use it on my projects).
In this case, the function called to save is ... $object->insert()...
Import is the only way that calls this function. Any other means use $object->save().
Unluckily, although $object->insert() realizes a save calling SqlElement::saveSqlElement, the save() method of all the objects is not called, so all calculated fields are not updated.

So the fix is : on /model/persistence/SqlElement.php, replace lines 307 and following from
public function save() {
    return $this->saveSqlElement();
  }

  public function insert() { // Specific function to force insert with a defined id - Reserved to Import fonction
    return $this->saveSqlElement(false, false, true);
  }
to
public function save() {
    if (isset($this->_onlyCallSpecificSaveFunction) and $this->_onlyCallSpecificSaveFunction==true) return;
    return $this->saveSqlElement();
  }

  public function insert() { // Specific function to force insert with a defined id - Reserved to Import fonction
    $this->_onlyCallSpecificSaveFunction=true;
    $this->save(); // To force the update of fields calculated in the save function ...
    $this->_onlyCallSpecificSaveFunction=false;
    return $this->saveSqlElement(false, false, true);
  }

This fix will be deployed on V3.5.0

Babynus
Administrator of ProjeQtOr web site
Last edit: 28 Aoû 2013 19:55 by babynus.

Please Connexion or Create an account to join the conversation.

More
30 Aoû 2013 18:11 - 30 Aoû 2013 18:12 #14 by leodom
Babynus the genius !

Great thanks for that quick fix !
I will try it now...
Last edit: 30 Aoû 2013 18:12 by leodom. Reason: spelling correction

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.028 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.