Menu

level 1 and level2 same approval

adam
2023-09-12
2023-09-14
  • adam

    adam - 2023-09-12

    For some agent the approver Level1 and Level 2 are the same person. In this case the Approver get error

    You are not allowed to update the fields: Last update, Status, TTO, TTR: issues = {0=>You are not allowed to update the fields: Last update, Status, TTO, TTR}, class = UserRequest, id = 526
    
    Please contact your ICT Portal administrator if the problem keeps happening.
    

    Approvers L1
    SELECT Person AS manager JOIN Person AS employee ON employee.manager_id = manager.id WHERE employee.id=:this->caller_id

    Approvers L2
    SELECT Person WHERE id=397

    Screen shot as attached.

    I have tried this but still getting error.
    Approvers L2
    SELECT Person WHERE Person.email = 'xxx' AND Person.id NOT IN ( SELECT Person AS manager JOIN Person AS employee ON employee.manager_id = manager.id WHERE employee.id=:this->caller_id

    Please help how can i have the same approver for L1 and L2

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-09-12

    Your last query seems to be missing ")" at the end.

    But the error suggests a lack of proper permissions for the approver on the user request class.

     
  • adam

    adam - 2023-09-12

    Hi Jeff, sorry i miss the ")" during copy paste. By the way the same approver able to approve if i left the Approvers L2 empty. Only if the same approver happen to be in Level1 and in Level 2 im getting this error.

    If lack of permission for the approver on the user request how do i grand the permission.

     
  • adam

    adam - 2023-09-12

    i saw the similar issue here https://sourceforge.net/p/itop/tickets/2014/?limit=25 but not quite understand the solution given by Yann Reangsey .

     
  • adam

    adam - 2023-09-14

    Please Help. I got this in error log. Not sure where i am making the mistake.. The Approver 1 able to approve with out any issue when come to Approver 2 i got this error. If i switch the Approver2 to Approver 1 then he able to approve. So the problem at the Approver 2..

    array (
    'exception class' => 'MySQLNoTransactionException',
    'file' => '/iTop/core/cmdbsource.class.inc.php',
    'line' => 754,
    'uri' => '/env-production/itop-portal/index.php/approval/approvals',
    )
    2023-09-14 14:43:52 | Error | 63 | You are not allowed to update the fields: Last update, Status, TTO, TTR: issues = {0=>You are not allowed to update the fields: Last update, Status, TTO, TTR}, class = UserRequest, id = 538 | CoreCannotSaveObjectException |||
    array (
    'exception class' => 'CoreCannotSaveObjectException',
    'file' => '/iTop/core/dbobject.class.php',
    'line' => 3192,
    'uri' => '/env-production/itop-portal/index.php/approval/approvals',
    )

     

    Last edit: adam 2023-09-14
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-09-14

    The error suggests a lack of proper permissions for the approver on the user request class.

    Can you verify that the user (approver) actually has permission to update the user request?

     
  • adam

    adam - 2023-09-14

    Hi Jeff, Thank you so much. The issue has been resolved. Currently under the Level 2 approver i have Profile "Service Manager" after i add another Profile "Service Desk Agent" and OQL

    Approvers L2
    SELECT Person WHERE Person.email = 'xxx' AND Person.id NOT IN ( SELECT Person AS manager JOIN Person AS employee ON employee.manager_id = manager.id WHERE employee.id=:this->caller_id) 
    

    Everything working as expected. I hope it helps anyone with similar issue. Again Thank you so much Jeff :)

     
    👍
    2

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.