You are not logged in.
Hello friends,
In version 0.84 of GLPI is possible to assign a ticket to a location, and even, you can create a rule to define the location of the ticket automatically from the location of the requester.
But, see my situation:
I have a ticket template that is mandatory to set the location. If do I create a rule for automatic setting the location, it is only processed at the time the ticket is sent, but if I do not select the locale is not possible to create the ticket. So, the ticket can only be created if the location is selected manually.
To work around this, I created a patch for the file inc/ticket.class.php that modifies a part of the method showForm() order for the location be automatically set when the requester is selected.
I wish the project coordinators think of the possibility of including this little feature in new versions.
See bellow the patch generated:
--- inc/ticket.class.php 2013-09-04 15:42:49.000000000 -0300
+++ inc/ticket.class.php 2013-09-06 17:00:02.205105783 -0300
@@ -4329,6 +4329,12 @@
echo "<td>";
echo $tt->getBeginHiddenFieldValue('locations_id');
if ($canupdate) {
+ if (!$ID && $values["_users_id_requester"] > 0){
+ $requester = new User();
+ $requester->getFromDB($values["_users_id_requester"]);
+ $this->fields['locations_id'] = $requester->fields['locations_id'];
+ unset($requester);
+ }
Location::dropdown(array('value' => $this->fields['locations_id'],
'entity' => $this->fields['entities_id']));
} else {
Note: the patch was generated to 0.84.1 version.
Best Regards,
Antonio Franco
Offline
Very good!
Thiago Passamani - GLPI 0.85.1
Consultoria em TI · Infraestrutura / Suporte · Wordpress Developer · Web Designer
+55 (27) 9933-4235 / thiagopassamani@gmail.com / contato@thiagopassamani.com.br
www.thiagopassamani.com.br
Offline
Antonio faz sua solicitação de mudanças aqui:
http://www.glpi-project.org/forum/viewforum.php?id=10
Thiago Passamani - GLPI 0.85.1
Consultoria em TI · Infraestrutura / Suporte · Wordpress Developer · Web Designer
+55 (27) 9933-4235 / thiagopassamani@gmail.com / contato@thiagopassamani.com.br
www.thiagopassamani.com.br
Offline