You are not logged in.
Pages: 1
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
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
Thanks a lot.. it works!!
Offline
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
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
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
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
Pages: 1