Menu

#1508 Request Templates: config not used as claimed in documention

Unassigned
not-reproduced
nobody
None
Extension
Medium
2.3.3
defect
2017-12-26
2017-11-13
Michael
No

In request_templates extension's doc, there is:

"copy_to_log string The attribute into which the template values should be copied. Set to an empty string to disable this behavior. public_log"

but code use:

$sLogAttCode = GetConstant($sClass, 'PUBLIC_LOG');
$oRequest->Set($sLogAttCode, $oTemplate->GetPostedValuesAsText($oRequest)."\n");

in DoCreateRequest from /var/www/html/itop/portal/index.php

which makes config item is ignored and publiclog is always used.


maybe using

$sCopyToLog = utils::GetConfig()->GetModuleSetting('itop-request-template', 'copy_to_log', 'public_log');

from /var/www/html/itop/extensions/itop-request-template/main.itop-request-template.php
(OnDBInsert and BeyondWriteValues functions)

would fix this.

Discussion

  • Vincent @ Combodo

    • status: new --> closed
     
  • Vincent @ Combodo

    I have tested with an iTop 2.4.0 and Request Template 2.0.8
    In the configuration file, I have set

    'itop-request-template' => array (
           'copy_to_log' => 'private_log',
    ),
    

    It works as designed and as documented, the request form has been copied in the private log

    Then I have set:

    'itop-request-template' => array (
            'copy_to_log' => '',
    ),
    

    And again this has behaved as expected, the request form has not been copied at all.

     
  • Vincent @ Combodo

    • status: closed --> not-reproduced
     

Log in to post a comment.

Auth0 Logo