You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-07-04 07:02:29

JohnnyMacau
Member
Registered: 2023-07-04
Posts: 8

formcreator answer status kept as waiting after approval

Hi, all,
I recently upgrade from glpi 9.5.5 + form creator 2.11.4  to  glpi 10.0.7 + form creator 2.13.6, and I found a weird problem.
for a form that needs approval and it has a ticket target, and the target ticket need someone to approve,
after a form answer is approved, it created a target ticket whose status is waiting for approval because it is just created,
the problem is the form answer's status keep as waiting for approval, and the approver is able to approve it again and again,
and if the approver do that, it will create tickets with the same content again and again, that does not make sense....
I check the history of the form answer, and I can see a record that states it's status is changed from waiting to accepted, but in deed its status is still waiting.

and i check the source code of formcreator, compare the new version with old version, and I found the trick, in the file inc/formanswer.class.php,
in the founction post_updateItem, I see some new codes added for new version:

  $minimalStatus = $formAnswer->getAggregatedStatus();
      if ($minimalStatus !== null) {
         $this->updateStatus($minimalStatus);
      }

it check all the tickets of the formanswer, and update the stutus to minimalStatus, coz the tickets are just created, their status should be waiting for approval(if they need approval),
so the formanswer status is updated back to waiting.....

Can someboy help me out? is this by design or bug? or I missed anything else?
thanks a lot.

btw, if I commended  $this->updateStatus($minimalStatus), the formanswer status can be set accepted normally.

Offline

#2 2023-07-05 02:58:47

JohnnyMacau
Member
Registered: 2023-07-04
Posts: 8

Re: formcreator answer status kept as waiting after approval

does anyone have any idea?

Offline

Board footer

Powered by FluxBB