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 2016-09-27 11:51:14

muhammadsaadkhurshid
Member
Registered: 2016-09-07
Posts: 77

Hide Historical Tab from Ticket Menu

Is there any way to hide historical menu option from ticket details. Because i dont want the user can able to see all the history of the desired category and also the other changes. If history is there than it should be specific to the desired ticket history not the whole history. Kindly help me in out this.

Thanks

Offline

#2 2016-09-28 07:08:35

muhammadsaadkhurshid
Member
Registered: 2016-09-07
Posts: 77

Re: Hide Historical Tab from Ticket Menu

please help me in this query.

Offline

#3 2016-09-28 18:02:53

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Hide Historical Tab from Ticket Menu

You can't without changing the source code


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#4 2016-09-29 06:50:50

muhammadsaadkhurshid
Member
Registered: 2016-09-07
Posts: 77

Re: Hide Historical Tab from Ticket Menu

can you guide me the exact source file so i can change or remove the menu from that file. Thanks

Offline

#5 2016-10-04 16:34:33

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Hide Historical Tab from Ticket Menu

In source code you can delete part showing Historical tab, but you can't hide only a part of this historical


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#6 2016-10-06 06:48:20

muhammadsaadkhurshid
Member
Registered: 2016-09-07
Posts: 77

Re: Hide Historical Tab from Ticket Menu

can you please guide me more specifically from the code level that from which file i have to edit to hide historical option in glpi.

Thanks

Offline

#7 2016-10-06 15:48:11

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Hide Historical Tab from Ticket Menu

Define tabs of the item


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#8 2022-02-26 23:38:53

random389
Member
Registered: 2019-12-14
Posts: 29

Re: Hide Historical Tab from Ticket Menu

src/ticket.php
look for the line containing  $this->addStandardTab('Log', $ong, $options);


Support GLPI with a donation : opencollective.com/glpi-project

Offline

#9 2022-02-28 13:38:48

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: Hide Historical Tab from Ticket Menu

This isn't necessary. The historical tab doesn't show in the simplified interface. For standard interface profiles, you can remove the "Historical" permission under the Profile's Administration tab.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#10 2022-03-01 09:58:38

giang
Member
Registered: 2022-02-11
Posts: 50

Re: Hide Historical Tab from Ticket Menu

cconard96 wrote:

This isn't necessary. The historical tab doesn't show in the simplified interface. For standard interface profiles, you can remove the "Historical" permission under the Profile's Administration tab.

@cconard96,

In pact, historical tab still show in the simplified interface.

Thanks,
Giang.

Offline

#11 2022-03-01 10:02:42

giang
Member
Registered: 2022-02-11
Posts: 50

Re: Hide Historical Tab from Ticket Menu

random389 wrote:

src/ticket.php
look for the line containing  $this->addStandardTab('Log', $ong, $options);

If i del this line -> Historical tab will be hidden from both requester and technician's ticket menu tab.
So, how to edit to just hide historical tab from requester's ticket tab (simplified interface)?

Thanks,
Giang.

Last edited by giang (2022-03-01 10:10:00)

Offline

#12 2022-03-02 02:04:10

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: Hide Historical Tab from Ticket Menu

9.5.7 and GLPI 10 both have no historical tab for simplified interface. If you have it, something seems to be wrong in your database.
What result do you get with this query?
SELECT rights FROM GLPI_DB.glpi_profilerights WHERE profiles_id=PROFILES_ID AND name="logs";
Replace "GLPI_DB" with your database name and "PROFILES_ID" with the profile used by your regular users.

It should be "0" while a standard interface with the permission should be "1".


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#13 2022-03-02 09:11:09

giang
Member
Registered: 2022-02-11
Posts: 50

Re: Hide Historical Tab from Ticket Menu

cconard96 wrote:

9.5.7 and GLPI 10 both have no historical tab for simplified interface. If you have it, something seems to be wrong in your database.
What result do you get with this query?
SELECT rights FROM GLPI_DB.glpi_profilerights WHERE profiles_id=PROFILES_ID AND name="logs";
Replace "GLPI_DB" with your database name and "PROFILES_ID" with the profile used by your regular users.

It should be "0" while a standard interface with the permission should be "1".

My ver. 9.5.5.
However, how to find database name and Profiles_id ?


Thanks,
Giang.

Last edited by giang (2022-03-02 09:21:51)

Offline

#14 2022-03-02 19:39:06

AmberAmey8hH
Member
Registered: 2022-03-02
Posts: 3

Re: Hide Historical Tab from Ticket Menu

i dont want the user can able to see all the history of the desired category and also the other changes.

Offline

#15 2022-03-03 04:35:55

giang
Member
Registered: 2022-02-11
Posts: 50

Re: Hide Historical Tab from Ticket Menu

AmberAmey8hH wrote:

i dont want the user can able to see all the history of the desired category and also the other changes.

inc/ticket.class.php
Pls find and delete this line:  $this->addStandardTab('Log', $ong, $options);

Thanks,
Giang.

Last edited by giang (2022-03-03 04:36:18)

Offline

#16 2022-03-03 15:25:58

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 774
Website

Re: Hide Historical Tab from Ticket Menu

Hi, Curtis,

Self-service users do have access to the historical tab. At least in 9.5.7 and 10.rc1.
They miss access to the Logs menu under administration.

Thanks, Giang for pointing out the code. This is a nice feature to have, maybe for our YAGP plugin.

Cheers,

cconard96 wrote:

9.5.7 and GLPI 10 both have no historical tab for simplified interface. If you have it, something seems to be wrong in your database.
What result do you get with this query?
SELECT rights FROM GLPI_DB.glpi_profilerights WHERE profiles_id=PROFILES_ID AND name="logs";
Replace "GLPI_DB" with your database name and "PROFILES_ID" with the profile used by your regular users.

It should be "0" while a standard interface with the permission should be "1".

Offline

#17 2023-01-06 13:51:07

cmfz
Member
Registered: 2023-01-06
Posts: 4

Re: Hide Historical Tab from Ticket Menu

cconard96 wrote:

9.5.7 and GLPI 10 both have no historical tab for simplified interface. If you have it, something seems to be wrong in your database.
What result do you get with this query?
SELECT rights FROM GLPI_DB.glpi_profilerights WHERE profiles_id=PROFILES_ID AND name="logs";
Replace "GLPI_DB" with your database name and "PROFILES_ID" with the profile used by your regular users.

It should be "0" while a standard interface with the permission should be "1".

I've checked this option and is at 0 for self-service profile, but in user simplified interface it still shows historical tab if it's inside a ticket details, this shows many info that should not be visible to end user.
(Self-Service portal Menu Tickets->Select any type (open/solved/closed)->select the ticket item
New GLPI version 10.0.5 installation
glpi-historical

Offline

#18 2023-07-28 14:22:08

breizhoo
Member
Registered: 2022-03-10
Posts: 10

Re: Hide Historical Tab from Ticket Menu

Hi everyone,
An awfull solution to hide stat and log tickets tabs for end-users only in GLPI 10.
Edit "htdocs\glpi\src\Ticket.php" defineTabs function like this :

    public function defineTabs($options = [])
    {
        $ong = [];
        $this->addDefaultFormTab($ong);
       
       /** first update below **/
        if (Session::getCurrentInterface() == 'central') {
            $this->addStandardTab(__CLASS__, $ong, $options);
        }
        $this->addStandardTab('TicketValidation', $ong, $options);
        $this->addStandardTab('KnowbaseItem_Item', $ong, $options);
        $this->addStandardTab('Item_Ticket', $ong, $options);

        if ($this->hasImpactTab()) {
            $this->addStandardTab('Impact', $ong, $options);
        }

        $this->addStandardTab('TicketCost', $ong, $options);
        $this->addStandardTab('Itil_Project', $ong, $options);
        $this->addStandardTab('ProjectTask_Ticket', $ong, $options);
        $this->addStandardTab('Problem_Ticket', $ong, $options);
        $this->addStandardTab('Change_Ticket', $ong, $options);

        if (Session::getCurrentInterface() == 'central') {
            $this->addStandardTab(Ticket_Contract::class, $ong, $options);
        }

        if (
            Entity::getAnonymizeConfig($this->getEntityID()) == Entity::ANONYMIZE_DISABLED
            || Session::getCurrentInterface() == 'central'
        ) {
            /** second and last update below **/
            if (Session::getCurrentInterface() == 'central') {
                  $this->addStandardTab('Log', $ong, $options);
            }
         }

        return $ong;
    }

Offline

Board footer

Powered by FluxBB