Menu

"Deletion Ticket" shouldn't remove entry from Database

2020-11-23
2020-11-25
  • Mushrraf Baig Ashraf

    Hello! Hopefully you are fine!

    Right now, if we "Delete" a request ticket from backend, it gets deleted and every trace of it is also erased from the database, to be specific, from "ticket" and "ticket_request".

    But, I want to make it retain all the tickets in the database and only change its status to something "Cancelled" so admins can view them even if the assigned employees remove them.

    I know that we can only add a new Status to LifeCycle. Even, I had noticed in of the files a "To-DO" which was referring to the same thing. So, is there anyone who has already done this or any suggestion or recommendation?

    I am using version 2.6.3.

    Regards
    Mushrraf Baig Ashraf

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-11-23

    Hello,
    You may be interested in the archive mechanism introduced in iTop 2.4 ?
    See this wiki page : Archiving [iTop Documentation]

     
    • Mushrraf Baig Ashraf

      Thank you for your really helpful reply!

      So, let's say I have enabled Archiving on Tickets and added a state "Cancelled" for Request Ticket.

      So now, I have to remove "Delete" from "Other Options" menu. So, this option is no longer available for the user. Where can I achieve this? Any clue would be helpful.

       
      • Pierre Goiffon

        Pierre Goiffon - 2020-11-23

        Creating and assigning a custom profile without the "delete" right for the needed classes should do the trick ?
        Have a look at Creating new Profiles [iTop Documentation]

         
  • Mushrraf Baig Ashraf

    Thank you @Pierre!

    In fact, I am trying to disable "delete" action for Admin, outright. So, I tried the following:

    <user_rights>
            <profiles>
                <profile id="1">
                    <groups>
                        <actions>
                          <action id="action:delete" _delta="redefine">deny</action>
                        </actions>
                    </groups>
                </profile>
            </profiles>
        </user_rights>
    
    But, it says:
    
    Error loading module "itop-request-template-portal": /itop_design/user_rights/profiles/profile[1]/groups/actions/action[action:delete] at line 10: could not be modified
    

    which clearly means that I can't curb an "Admin" : )

    So, there is no way of achieving this through Extension. Right?

     
  • Pierre Goiffon

    Pierre Goiffon - 2020-11-25

    Indeed the Administrator profile can't be changed... But you can create another profile as a replacement !

     

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.