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 2020-11-20 12:33:56

mklimasz
Member
Registered: 2017-12-14
Posts: 82

How to set default validation level for all changes [9.5.2]

Hi

I've been trying to find, where I can set the default validation level for all newly initiated changes. Vanilla install gives "none" to the "Minimum validation required" [EN] field, while all changes that we originate must default to 100%. The answer is somewhere in the code, but it is so entangled that I can't trace it... Result is stored as a plain value in glpi_changes table, field validation_percent, thus I suspect there is no (or not much) "dropdown magic" there...

Any idea where it can be changed so the new Changes originate with this parameter always set to 100%? Unfortunately, there is no such field in the templates, otherwise I would have used that to force required value...

Bests,
Michal

Offline

#2 2020-11-27 16:23:31

mklimasz
Member
Registered: 2017-12-14
Posts: 82

Re: How to set default validation level for all changes [9.5.2]

Maybe it is a trivial question, but how I can observe POST VARIABLES in debug mode (it always displays "empty array" in my case - which is not that difficult to understand since I'm displaying debug console after the page loads again...)? Perhaps there is some other way to detect what gets injected by default into INSERT statement for "validation_percent" column...? If I only knew where and how the defaults are constructed this might have moved my case forwards.

I really need some help there, as the default = "none" does not do the trick for me...

Offline

#3 2020-12-17 18:50:58

mklimasz
Member
Registered: 2017-12-14
Posts: 82

Re: How to set default validation level for all changes [9.5.2]

Informational: for the moment I decided to give it a kick through cron task invoked every 5 minutes, to actually force compliance with mandatory full approval for all changes:

mysql --user="xxxxxxxxx" --password="xxxxxxxxxx" --database=glpi --execute="UPDATE glpi_changes SET validation_percent = 100 WHERE validation_percent <> 100"

This, perhaps, isn't the best way (knowing how to force a default validation level up front would certainly do a better job!), but there was no clue shared / neither I was able to discover any other way (failed at code analysis, don't really know where SQL gets constructed to inject the required value)...

Anyone?

Offline

Board footer

Powered by FluxBB