Giter VIP home page Giter VIP logo

pluginsglpi / formcreator Goto Github PK

View Code? Open in Web Editor NEW
171.0 31.0 125.0 38.03 MB

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)

Home Page: http://www.teclib-edition.com

License: GNU General Public License v3.0

PHP 89.31% CSS 0.23% JavaScript 2.79% Shell 0.66% SCSS 0.79% Twig 6.22%
service-catalog ticket helpdesk incident-management servicedesk itil php open-source gplv2

formcreator's Issues

mandatory field bug

I configure a dropdown list field A, and a date field B. The date field B is configured to be visible only if A = something, and is mandatory.

I'm expecting the date field B is mandatory only if visible. If not, it should be ignored.

The plugin says I must fill the field B, despite it is hidden.

faulty SQL query

I noticed this in SQL-errors.log

I do not have any information about the context of this error.
Notice the followinf part of the query :
AND ( glpi_plugin_formcreator_forms.entities_id IN () )
The keyword IN refers to an empty group of values.

2014-09-11 18:42:43
*** MySQL query error:


SQL: SELECT glpi_plugin_formcreator_forms.id, glpi_plugin_formcreator_forms.name, glpi_plugin_formcreator_forms.description
FROM glpi_plugin_formcreator_forms
WHERE glpi_plugin_formcreator_forms.is_active = 1
AND (glpi_plugin_formcreator_forms.language = 'fr_FR' OR glpi_plugin_formcreator_forms.language = '')
AND ( glpi_plugin_formcreator_forms.entities_id IN () )
AND (access_rights != 2 OR glpi_plugin_formcreator_forms.id IN (
SELECT plugin_formcreator_forms_id
FROM glpi_plugin_formcreator_formprofiles
WHERE plugin_formcreator_profiles_id = 0))
AND helpdesk_home = 1
ORDER BY glpi_plugin_formcreator_forms.name ASC
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') )
AND (access_rights != 2 OR glpi_plugin_formcreator_forms' at line 5
Backtrace :
/var/www/glpi/plugins/formcreator/ajax/homepage_forms.php :18 DBmysql->query()
/var/www/glpi/plugins/formcreator/ajax/homepage_forms.php

Proposed features - Show section and Multiple conditions

  • Add an "Other" option on Checkboxes and Radios that automatically adds a text field
  • Add "Show section" option on Section (show this section only if fields...)
  • Multiple conditions for "Show field" (ex: only if field A=0 and B=1)

Thank you and congratulations for this plugin :)

Bug with conditional display of a field

I program a form with a field containing 2 radio buttons (values yes / no)
I program an other field (a list) which must be shown only if the first field = Yes
On preview : the conditional field never appears.

Ability to resend a request for validation

Add an option for each form to select "Number of days before resend request validation".
--> an automatic action resend request validation with this option

Add a right for each profile "Add button to resend request validation".
--> if "Yes" : on the form answer, this user has a button to resend request validation.

To be discuss.

Improve default notification

Not very important, but only one notification with raw text in english is available.

we can use tag for this text

php-errors.log grows very quickly

I'm using FusionInventory and FusionInventory agent

Since I upgraded to FormsCreator v2, php-errors.log is filled several times per minut with the following errors :

2014-09-08 08:39:32
Notice(8): Undefined index: glpiactiveprofile
Backtrace :
/var/www/glpi/plugins/formcreator/setup.php:66 Toolbox::userErrorHandlerNormal()
/var/www/glpi/inc/plugin.class.php:101 plugin_init_formcreator()
/var/www/glpi/inc/includes.php:130 Plugin::load()
/var/www/glpi/plugins/fusioninventory/b/deploy/index.php:43 include()

2014-09-08 15:29:51
Notice(8): Undefined index: glpiactiveprofile
Backtrace :
/var/www/glpi/plugins/formcreator/setup.php:66 Toolbox::userErrorHandlerNormal()
/var/www/glpi/inc/plugin.class.php:101 plugin_init_formcreator()
/var/www/glpi/inc/includes.php:130 Plugin::load()
/var/www/glpi/plugins/fusioninventory/index.php:43 include()

I'm the only user of the plugin FusionIvnentory and I think the error comes from the HTTP requests made by the agents.

Comparing the timestamps in php-errors.log and Apache's access.log shows I'm probably right.

When a FI Agent sends a HTTP request to GLPI, I think the variable $_SESSION['glpiactiveprofile'] is not defined, and this generates an error in Form Creator v2

crash on glpi object

master of 2015, 23 jan

( ! ) Fatal error: Class 'dropdownField' not found in glpi/plugins/formcreator/inc/fields/glpiselect-field.class.php on line 3
Call Stack

Time Memory Function Location

1 0.0002 240520 {main}( ) ../form.form.php:0
2 0.0524 2130232 PluginFormcreatorForm->saveForm( ) ../form.form.php:50
3 0.0530 2535472 include_once( 'glpi/plugins/formcreator/inc/fields/glpiselect-field.class.php' ) ../form.class.php:850

Browsing between forms does not work

With a account able to manage forms, I open a form from the list.
If I use the arrows on top of the current form to switch to the first form, the previous form, the next form or the last form, the display is refreshed, but the current form does not change as expected.
formcreatorv2

EDIT : Notice the URL contains the variable "id" twice, with different values after trying browsing from a form to an other.

Voir le(s) ticket(s) généré(s) depuis la page d'une réponse d'un formulaire

Dans la page de réponse d'un formulaire (lorsqu'il est validé : de façon automatique ou avec le process de validation) il serait interessant de voir quel ticket (destination) est lié à ce formulaire (si destination il y a).

Exemple concret :

  • je fais une demande en remplissant le formulaire "Demande de congés" : cela enregistre ma demande et la valide automatiquement (je n'ai pas de process de validation)
  • ma réponse à ce formulaire devient alors consultable car stockée en base de données
  • je peux alors cliquer sur la réponse stockée (via l'interface "Mes demandes", et là j'ai un onglet qui me permet de voir directement quel ticket a été généré (ou quels tickets si j'ai plusieurs destinations)

Ability to add css suffixes to form, questions and sections

The idea is to customize the display of the form by a css file included in a theme (for example).

  • (A) in the form configuration (besides name, active, category ...) add a field "CSS Class Suffix"
  • (B) in the section configuration (besides title) add a field "CSS Class Suffix"
  • (C) in the question configuration (besides title, type...) add a field "CSS Class Suffix"

Example - Configuration :

  • in (A) I put : _myform
  • in (B) I put several : _mysection_1, _mysection_2....
  • in (C) I put : _myquestion_1, _myquestion_2, _myquestion_3, _myquestion_4....

Example - Display :

  • I can customize div form with formcreator_form_myform and formcreator_form_myform > form-title ...etc
  • I can customize div section with form_section_mysection_1, form_section_mysection_2...etc
  • I can customize div question with form-group_myquestion_1, form-group_myquestion_2...etc

Add more target possibilities to forms

Add the possibility to target entities, groups, profiles and specific user for a form.

Reproduce the functionnalities from "Reminders" and "knowbase items".

Add feature to disable email notification to requester

When a change has been recorded to the ticket, the requester may receive an email notification. Add an option to disable notifications to requesters, an other to disable notifications to observers and an third one for technicians.

Date field size is wrong

I define a conditional date field. It must show only if a dropdown field contains a specific value.

When the dropdown contains the expected value, the date field appears as expected, but its width is near of 0. I cannot see the date I pick up in the JS calendar.

Message not show on form category delete

The message "Élément supprimé définitivement avec succès : <name_of_former_category_deleted>" is not show when a category is deleted. It's show when you view a other page.

Add validation proccess for forms

Add a validation process (optional) to forms before creating tickets or sending to other destinations.

Form configuration:

- Add a field "The form need to be validated (Yes/No)"
- If the previous field is set to "Yes": Add 2 multiselect fields with validators (users with ticket validation abilities) to set witch users can be chosen by end-user to be the validator. (All validators by default).

Form entry (if the form need to be validated)

- Automatically add a field at the end of the form: "Choose a validator". A select field with allowed validator.
- The form is saved into database with a state "waiting for validation"
- A notification e-mail must be send to the chosen validator
- The validator can accept or refuse the form. If refused, a refused comment is required.
    - If accepted: The form is processed like now (ticket(s) creation)
    - If refused: the form get a status of "refused by validator" and can be edited by requester and resubmitted. A notification is sent to the requester when refused.

List of seized forms

- 2 blocs should be added to the form list:
    - "My forms (requester)" => (last 10 forms user submitted. status refused and waiting in priority)
    - "My forms (validator)" => (last 10 forms waiting for validation and with user as validator)
- A list page (with search engine) with:
    - all forms if user is validator or administrator
    - all forms submitted by user otherwise
    - A link button near "search" and "config" buttons in toolbar

Show field condition issue

To reproduce, make this form :
Question1 - Radios - Values "1", "2"
Question2 - Select - Show only if Question1=2 - Values "A", "B", "Other"
Question3 - Text - Show only if Question2=Other

Bug on this form :
1- Select value "2" at Question1
2- Select value "Other" at Question2 (Question3 appears => ok)
3- Select value "1" at Question1 => Question3 does not disappear !

Regards,
Jonas

Template tickets in root entity

Upgrade process from FormCreator v1 to v2 creates ticket templates in root entity.

They should be created in the same entity as the form.

Forms list not displayed in central view

When a user has no right to see it's planning, the forms list form is not displayed because it relies on (a[href*=front/planning.php])

Another solution should be found to display the form when it's needed.

Crash if a user forgets to set the title of a new question

While trying a specific configuration of a field, i forgot to set the title a a question. GLPI crashes with a blank page and the following message :

PHP Notice: Undefined index: plugin_formcreator_sections_id in /var/www/glpi/plugins/formcreator/inc/question.class.php at line 512

Fatal error: Call to a member function fetch_array() on a non-object in /var/www/glpi/glpi/inc/dbmysql.class.php on line 268

EDIT :
After trying to reproduce to fill this bug report, I recreated my question correctly. Upon validation, the I got several error messages saying the title is missing (I did not fill the title 3 times, and I got the message three times too). Hopefully, the question is correctly saved in database.

Possibilté de cloner un formulaire

Fonctionnalité qui permet de "cloner" un formulaire existant vers un nouveau formulaire.
Afin d'accélérer la création de formulaires qui se ressemblent.
Le nouveau formulaire récupère toutes les infos de l'ancien :

  • actif = NON par défaut
  • on demande le nouveau titre en pré-remplissant par ex : "Copie - Ancien nom"
  • on récupère questions/sections/cibles/destinations...

Formulaire accepté : Accepté ne s'affiche pas

En cas de formulaire à valider, puis refusé, lorsque son auteur ouvre le formulaire, en haut, sous l'entête du formulaire s'affiche 'Refusé' (en rouge)
Mais s'il s'agit d'un formulaire accepté, alors il ne s'affiche qu'un petit carré vert.

De même, si c'est le valideur qui ouvre un formulaire qu'il a refusé, il ne s'affiche rien du tout.

List LDAP value --- Valeur liste LDAP

If a user do not select an entry in a LDAP list, the value displayed on the generated ticket is the first entry of the list instead of a zero value.


En mettant un champ de type "Liste LDAP", si l'utilisateur ne sélectionne rien dans la liste, la valeur de la première entrée de la liste est prise en compte dans le ticket généré (et même si "Afficher une valeur vide" est sélectionné), au lieu d'une valeur nulle ou vide.

PHP warnings (related to validation feature ?)

While setting up a form I see 2 warnings in debug mode. Here are the backtraces :

2014-10-16 15:06:09
Notice(8): Undefined index: validation_required
Backtrace :
/glpi/inc/toolbox.class.php:531 Toolbox::userErrorHandlerNormal()
/glpi/plugins/formcreator/inc/form.class.php:319 Toolbox::userErrorHandlerDebug()
/glpi/plugins/formcreator/front/form.form.php:77 PluginFormcreatorForm->showForm()

2014-10-16 15:06:09
Notice(8): Undefined index: validation_required
Backtrace :
/glpi/inc/toolbox.class.php:531 Toolbox::userErrorHandlerNormal()
/glpi/plugins/formcreator/inc/form.class.php:363 Toolbox::userErrorHandlerDebug()
/glpi/plugins/formcreator/front/form.form.php:77 PluginFormcreatorForm->showForm()

IE 8 compatibility

We have a problem on the field "display only if".

Please see screen capture bellow :

selection_011
selection_010
selection_009

Upgrade from v1

some regular expressions are wrong after upgrading to FormCreator v2

It appears that v1 automatically added leading and trailing regex marker, but v2 does not longer adds them.

Workaround : update my regex and add the '/' character before and after the regex string.

FormCreator v2 should add it in DB in the upgrade process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.