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 2008-10-14 13:01:45

cnice
Member
Registered: 2008-10-09
Posts: 2

Subcategories in ticket creation form

Hi everyone!

We are planning to use glpi 0.71.2 in our IT department for inventory-making and tickets tracking. So, we pretend that when the user fills the ticket form, he can specify the problem clearly with some categories and subcategories.

For example, if he wants to manage a RAM memory problem in his device, he can go to "hardware problem" => "RAM". For that purpose, we have created three categories (hardware problem, software instalation and intervention) with some subcategories for clarifying the ticket report.

The dropdown list works fine, with the categories in bold font and the subcategories tabulated. Our problem arise because we want that the user only can click on the subcategory section, and not the category.

There is any way for "blocking" some elements of a dropdown such as in "dropdowns setup"? I look up in the source code and I think that in the dropdown setup the "categories" are "titles", so there are not in the data table.

Some ideas about we can work it out?

Thanks for the replies and for this fantastic piece of software smile

Offline

#2 2008-10-22 10:20:05

cnice
Member
Registered: 2008-10-09
Posts: 2

Re: Subcategories in ticket creation form

Hi again,

For people interested in, I think I did something with the subcategories... is not the thing I'd want to do, but it seems to be valid. Instead of forbid the category selection, I let the user to choose it and then, when the system validates the form, I show an error message.

There is a commented (not used) getTreeItemLevel method in db.function.php (line 496 in version 0.71.2) wich provides the level of an Item in a dropdown, so I modified it for providing the parentID of the $ID.

Then, I add another error message in the languaje file ($LANG ["help"] [42]) and modify the tracking.class.php, so if $IDPar <1 for the selected category/subcategory the error arises (categories have parentID=0).

I don't know if this can serve someone, but if you want more information or have some suggestions, just post-it!

Offline

Board footer

Powered by FluxBB