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 2009-09-14 15:45:01

lassog
Member
Registered: 2009-05-05
Posts: 36

Priority Tickets

Hi.

Could I change the list of priorities... in the helpdeskform. When a user register a Ticket they can select Priority Very High, High, Medium,Low Or Very Low. But I need change this list. I need have 3 items. High, Medium and Low.

Please your help

Offline

#2 2009-09-29 11:18:12

scmi
Member
From: Germany
Registered: 2009-02-10
Posts: 80

Re: Priority Tickets

Hi lassog,
I changed the dropdown.function.php. Only the admin can set the priority very high.


//    echo "</select>";

if (haveRight("config","w")){                       
    echo "<option value='5' ".($value==5?" selected ":"").">".$LANG['help'][3]."</option>";}
    echo "<option value='4' ".($value==4?" selected ":"").">".$LANG['help'][4]."</option>";
    echo "<option value='3' ".($value==3?" selected ":"").">".$LANG['help'][5]."</option>";
    echo "<option value='2' ".($value==2?" selected ":"").">".$LANG['help'][6]."</option>";
    echo "<option value='1' ".($value==1?" selected ":"").">".$LANG['help'][7]."</option>";

    echo "</select>";   
}


Prod GLPI: 9.4.1.1 / Apache 2.4.25 (Debian) /PHP 7.0.30/ Server Software: Debian 9.1/Server Version: 10.1.26-MariaDB-0+deb9u1

Offline

#3 2009-10-02 18:52:44

lassog
Member
Registered: 2009-05-05
Posts: 36

Re: Priority Tickets

Thanks a lot.. it works!!

Offline

#4 2010-01-10 19:54:46

ispanicolive
Member
Registered: 2010-01-10
Posts: 1

Re: Priority Tickets

scmi wrote:

Hi lassog,
I changed the dropdown.function.php. Only the admin can set the priority very high.


//    echo "</select>";

if (haveRight("config","w")){                       
    echo "<option value='5' ".($value==5?" selected ":"").">".$LANG['help'][3]."</option>";}
    echo "<option value='4' ".($value==4?" selected ":"").">".$LANG['help'][4]."</option>";
    echo "<option value='3' ".($value==3?" selected ":"").">".$LANG['help'][5]."</option>";
    echo "<option value='2' ".($value==2?" selected ":"").">".$LANG['help'][6]."</option>";
    echo "<option value='1' ".($value==1?" selected ":"").">".$LANG['help'][7]."</option>";

    echo "</select>";   
}

--------------------------------------------------------------------------------------------------------------------
sorry but I have not understood
This is the original code

}

/**
* Dropdown of ticket priority
*
* @param $name select name
* @param $value default value
* @param $complete see also at least selection
*/
function dropdownPriority($name,$value=0,$complete=0){
    global $LANG;

    echo "<select name='$name'>";
    if ($complete){
        echo "<option value='0' ".($value==1?" selected ":"").">".$LANG['common'][66]."</option>";
        echo "<option value='-5' ".($value==-5?" selected ":"").">".$LANG['search'][16]." ".$LANG['help'][3]."</option>";
        echo "<option value='-4' ".($value==-4?" selected ":"").">".$LANG['search'][16]." ".$LANG['help'][4]."</option>";
        echo "<option value='-3' ".($value==-3?" selected ":"").">".$LANG['search'][16]." ".$LANG['help'][5]."</option>";
        echo "<option value='-2' ".($value==-2?" selected ":"").">".$LANG['search'][16]." ".$LANG['help'][6]."</option>";
        echo "<option value='-1' ".($value==-1?" selected ":"").">".$LANG['search'][16]." ".$LANG['help'][7]."</option>";
    }
    echo "<option value='5' ".($value==5?" selected ":"").">".$LANG['help'][3]."</option>";
    echo "<option value='4' ".($value==4?" selected ":"").">".$LANG['help'][4]."</option>";
    echo "<option value='3' ".($value==3?" selected ":"").">".$LANG['help'][5]."</option>";
    echo "<option value='2' ".($value==2?" selected ":"").">".$LANG['help'][6]."</option>";
    echo "<option value='1' ".($value==1?" selected ":"").">".$LANG['help'][7]."</option>";

    echo "</select>";
}

Offline

#5 2010-01-11 13:34:35

scmi
Member
From: Germany
Registered: 2009-02-10
Posts: 80

Re: Priority Tickets

Hi ispanicolive,

this code causes; only users with write privileges in the config (haveRight("config","w") can select priority very high

if (haveRight("config","w")){                       
    echo "<option value='5' ".($value==5?" selected ":"").">".$LANG['help'][3]."</option>";}

P.S. You can extend the code for all other priorities


Prod GLPI: 9.4.1.1 / Apache 2.4.25 (Debian) /PHP 7.0.30/ Server Software: Debian 9.1/Server Version: 10.1.26-MariaDB-0+deb9u1

Offline

#6 2010-12-14 11:39:59

mohant3ch
Member
Registered: 2010-12-14
Posts: 1

Re: Priority Tickets

Hi scmi,

I have the same prob too. I don't quite understand how you do it. Can you be a little more specific here? Thanks.

Regards,

Offline

#7 2010-12-14 13:27:53

scmi
Member
From: Germany
Registered: 2009-02-10
Posts: 80

Re: Priority Tickets

Hi mohant3ch,
1. it works only with glpi < .78
2. the code must change in .../inc/dropdown.function.php
3. U find the code near Line 2110
4. the trick :
// echo "</select>";
if (haveRight("config","w")){                       
    echo "<option value='5' ".($value==5?" selected ":"").">".$LANG['help'][3]."</option>";}

Normaly users like post-only have not rights to change the configuration, so they never seen the "very high priority"


P.S. In Glpi > .78 u can change it in Setup/Assistance: Matrix of calculus for priority: Urgency and Impact: Very High "no"

Regards


Prod GLPI: 9.4.1.1 / Apache 2.4.25 (Debian) /PHP 7.0.30/ Server Software: Debian 9.1/Server Version: 10.1.26-MariaDB-0+deb9u1

Offline

Board footer

Powered by FluxBB