On Mon, Aug 22, 2011 at 1:43 AM, Alec Taylor <alec.tayl...@gmail.com> wrote:

> Good evening,
>
> I have just been testing a variety of products, and GLPI with
> OCSinventory (or FusionInventory) seems to be the best I've come
> across. It seems to be the only free & open-source webfrontend package
> on the market providing IT HelpDesk (ticketing), knowledge-base
> management (incl. FAQ), software deployment, version control, and
> hardware inventory.
>
> I would like to build a small Intranet frontend around this, perhaps
> using Drupal (if there's nothing internal in GLPI or a plugin).
>
> How would I go about creating a simple form to add tickets to the GLPI
> IT HelpDesk?
>
> <email>
> {Select issue type}
> <Subject>
> <Issue>
> [Submit]
>
> I would also like to display the knowledge-base on the intranet (all
> without the user being required to login).
>
> Thanks for all suggestions,
>
> Alec Taylor
>
> FYI: {Select issue type} needs to be incorporated to go to specific
> groups in my GLPI HelpDesk.
>
> _______________________________________________
> Glpi-dev mailing list
> Glpi-dev@gna.org
> https://mail.gna.org/listinfo/glpi-dev
>


I've done something similar to what you described for my organization.  Our
GLPI install is for our entire College, and each department has their own,
customized helpdesk form on their websites that all feed into GLPI.  I've
attached example code of what I've done.

The "tracking.injector.php" file is a copy of the one from GLPI's
"front/tracking.injector.php" .  I simply use my own so I can easily brand
the page upon successful form submission and to allow for easier submission
from a PHP page I use to handle the form data.

"external_forms.php" is what processes the POST information from the forms.
 This allows me to do any custom processing I'd like, such as matching
emails / full names to existing GLPI users (function check_email and
check_user_name).

"blueslipform.php" is another PHP form processor I wrote with a very
specific task.  This is used by student advisors to handle student
requests...the form that feeds to the PHP script is displayed on a kiosk.
 Lines 42-65 are how I take non-GLPI fields and concat them into the content
field, which is still searchable in GLPI.

Populating an {issue type} dropdown would be relatively easy if your code
can call GLPI's built in functions.  Below is an example of generating a
dropdown based on a small subset of GLPI categories...

<?php
global $DB;

# This uses the category name to get the list of reasons rather than having
to reference the ID
# Adds a bit of flexibility especially between dev and live server
$categoryResults = $DB->query("SELECT id FROM glpi_ticketcategories WHERE
name='Blue Slip Form Reasons'");
$categoryID = $DB->result($categoryResults);
$query = "SELECT * FROM glpi_ticketcategories WHERE
ticketcategories_id='$categoryID'";
$result = $DB->query($query);

# Generates dropdown of all "Reasons"
print "<label>Choose a reason from this list
<select name=\"reason\"><option selected>Choose...</option>";

while ($data=$DB->fetch_array($result)) {
print "<option value=\"" .  $data["id"] . "\">" . $data["name"] .
"</option>";
}
print "</select></label>";

?>

- Trey

<<attachment: tracking.injector.php>>

<<attachment: blueslipform.php>>

<<attachment: external_forms.php>>

_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to