yllen / behaviors Goto Github PK
View Code? Open in Web Editor NEWThis plugin allows you to add optional behaviors to GLPI.
License: GNU Affero General Public License v3.0
This plugin allows you to add optional behaviors to GLPI.
License: GNU Affero General Public License v3.0
bonjour,
j'utilise glpi 10 et behavior 2.7.2, j'ai activé l'option Ajout du technicien connecté à la résolution/clôture d'un ticket et lorsque 2 techniciens sont affectés sur le ticket, nous ne pouvons pas résoudre le ticket (ajouter une solution).
La résolution du ticket fonctionne si il n'y a aucun technicien ou 1 seul technicien, j'ai testé en basculons l'option sur non et avoir 2 techniciens et ça fonctionne.
Merci d'avance de votre retour.
Bonjour !
Depuis le passage en 10.0.3, le plugin behavior me rajoute à la création d'un ticket, mon groupe + mon utilisateur en demandeur.
Alors que j'ai bien configuré à Non dans le plugin.
J'ai testé de désinstaller le plugin mais rien ne change, d'ailleurs si je désactive le plugin, je n'ai plus mon groupe et mon utilisateur qui sont ajoutés.
Une idée ?
Merci :)
After a long investigation, it came out that the problem with displaying in RO profiles items with Global Search enabled , configured in Generic Object is caused by the Behaviours plugin.
Specifically the "Show my assets" setting in it.
More:
https://forum.glpi-project.org/viewtopic.php?pid=496067#p496067
glpi-project/glpi#12571 (comment)
The problem that this setting affects not only the self-service profile but also other profiles where only RO permissions are set for selected assets created in GenericObject.
In addition, the assumption that users_id is the owner is far-fetched. here it would be better to let you set which field of type user is responsible for this (from fields that are available in GLPI and provided additionally e.g.: by plugin fields)
Profile rights:
glpi_profilerights
name rights
appliance 0
backup 0
bookmark_public 1
budget 0
cable_management 0
calendar 0
cartridge 0
certificate 0
change 0
changevalidation 0
cluster 0
computer 0
config 0
consumable 0
contact_enterprise 0
contract 0
dashboard 0
database 0
datacenter 0
device 0
devicesimcard_pinpuk 0
document 0
domain 0
dropdown 0
entity 1
glpi_profiles
"interface","is_default","helpdesk_hardware","helpdesk_item_type","ticket_status","comment","problem_status","create_ticket_on_login","tickettemplates_id","changetemplates_id","problemtemplates_id","change_status","managed_domainrecordtypes"
"central","0","0","[]",NULL,,NULL,"0","0","0","0",NULL,"[]"
Hi, I have the following error with version 2.6.0 for GLPI 9.5.9, thanks
Uncaught Exception Type Error: count (): Argument #1 ($value) must be of type Countable|array, bool given in itilsolution.class.php at line 342
Hello,
it would be great if Behaviors will be availiable via marketplace. Maybe you can add the plugin? :-)
regards
Hello
You offer the possibility to use format number YYMMDD0000 but in January 2022, this format will doesn't working.
ID ticket use a 32bits integer and max value is 2 147 483 647. So January 1st 2022 ID will be 2201010000. Tickets cannot be create with this ID.
I don't think what is possible to use a 64bits integer (GLPI source code need to be rewrite). But can you delete this offer in next version ?
Have a good day
PS : Sorry for my bad English
Hi,
When trying to activate the plugin I get the following error:
Error al crear glpi_plugin_behaviors_configs
glpi_plugin_behaviors_configs
( id
int unsigned NOT NULL, use_requester_item_group
tinyint NOT NULL default '0', use_requester_user_group
tinyint NOT NULL default '0', is_ticketsolutiontype_mandatory
tinyint NOT NULL default '0', is_ticketsolution_mandatory
tinyint NOT NULL default '0', is_ticketcategory_mandatory
tinyint NOT NULL default '0', is_ticketcategory_mandatory_on_assign
tinyint NOT NULL default '0', is_tickettaskcategory_mandatory
tinyint NOT NULL default '0', is_tickettech_mandatory
tinyint NOT NULL default '0', is_tickettechgroup_mandatory
tinyint NOT NULL default '0', is_ticketrealtime_mandatory
tinyint NOT NULL default '0', is_ticketlocation_mandatory
tinyint NOT NULL default '0', is_requester_mandatory
tinyint NOT NULL default '0', is_ticketdate_locked
tinyint NOT NULL default '0', use_assign_user_group
tinyint NOT NULL default '0', use_assign_user_group_update
tinyint NOT NULL default '0', ticketsolved_updatetech
tinyint NOT NULL default '0', tickets_id_format
VARCHAR(15) NULL, changes_id_format
VARCHAR(15) NULL, is_problemsolutiontype_mandatory
tinyint NOT NULL default '0', remove_from_ocs
tinyint NOT NULL default '0', add_notif
tinyint NOT NULL default '0', use_lock
tinyint NOT NULL default '0', single_tech_mode
int unsigned NOT NULL default '0', myasset
tinyint NOT NULL default '0', groupasset
tinyint NOT NULL default '0', clone
tinyint NOT NULL default '0', addfup_updatetech
tinyint NOT NULL default '0', is_tickettasktodo
tinyint NOT NULL default '0', is_problemtasktodo
tinyint NOT NULL default '0', is_changetasktodo
tinyint NOT NULL default '0', date_mod
timestamp default NULL, comment
text, PRIMARY KEY (id
) ) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC - Error Invalid default value for 'date_mod'Glpi: 10.0.1
php:8.1
All the best
Script from GLPI's team to solve this issue: glpi-project/glpi#10263
Originally posted by @yllen in #4 (comment)
Good night!
I saw the file that was changed and the new file that was created.
I added the new lines in the inc/dbmysql.class.php file and created the new inc/console/migration/unsignedkeyscommand.class.php file, then I restarted the server but I still can't generate a new ticket.
My GLPI version is 9.5.1 on a Debian 10. I use the Behavior plugin.
Thanks.
Hello Yellen!
I was in doubt about the releases you released.
We are currently on GLPI 9.5.5 and will update to version 9.5.7.
with the Behaviors plugin, we are at version 2.5.0 and we don't use the date format to change the ticket ID.
So, can we continue on GLPI version 9.5.7, and with the Behaviors plugin version 2.5.0?
Hi,
Hoping this is the right place to make a feature request. It would be helpful if behaviours could add the actor making a followup to the assigned technicians if they are not already a requester or watcher. This would be similar to the behaviours feature that adds a technician when a solution is provided. This would save us many clicks a day by not having to assign the ticket to ourselves and then switch to the follow-ups page.
Thanks
Hi thanks for your excellent job. I have been using Behaviors for years but on a fresh install of GLPI 10.0.0 i can't install the plugin:
Error at the table creation:
"L'erreur est Invalid default value for 'date_mod' "
Can you help me please?
Thanks
bonjour
sous GLPI 10.0.03 avec plugin behavior 2.7.1.
Type de solution est forcé à obligatoire.
Si un technicien rédige une solution et oublie de choisir un type de solution , il perd sa solution.
Serait t il possible d'avoir un message d'avertissement sans perte de solution
merci
Hi,
Is it possible to add the following behavior: to solve/close a ticket, there must be a technician assigned OR a group assigned. Basically, this would amount to setting the following two behaviors to Yes, but putting an OR between the two behaviors: Technician required to solve/close a ticket ; Technician group required to solve/close a ticket
Thanks for you help
Using GLPI 10.0.2 and 2.7.1 solution type is not mandatory,
https://github.com/yllen/behaviors/blob/master/inc/itilsolution.class.php#L58
if ($config->getField('is_ticketsolutiontype_mandatory')
&& !isset($soluce->input['solutiontypes_id'])){
$soluce->input = false;
Session::addMessageAfterRedirect(__("Type of solution is mandatory before ticket is solved/closed",
'behaviors'), true, ERROR);
return;
}
When you try to add solution and Type of solution is mandatory before ticket is solved/closed is true, but solution has as null, there is not the expected warning or behavior.
Do you think which is the problem? I though can be related to GLPI core hook.
If you debug entries, then get:
(
[dohistory] => 1
[userlinkclass] => Ticket_User
[grouplinkclass] => Group_Ticket
[supplierlinkclass] => Supplier_Ticket
[userentity_oncreate:protected] => 1
[hardwaredatas] => Array
(
)
[computerfound] => 0
[users:protected] => Array
(
[1] => Array
(
[0] => Array
(
[id] => 67881
[tickets_id] => 27117
[users_id] => 2
[type] => 1
[use_notification] => 1
[alternative_email] =>
)
)
[2] => Array
(
[0] => Array
(
[id] => 67882
[tickets_id] => 27117
[users_id] => 2
[type] => 2
[use_notification] => 1
[alternative_email] =>
)
)
)
[groups:protected] => Array
(
)
[suppliers:protected] => Array
(
)
[deduplicate_queued_notifications] =>
[fields] => Array
(
[id] => 27117
[entities_id] => 0
[name] => TICKET de prueba
[date] => 2022-07-28 13:18:06
[closedate] =>
[solvedate] => 2022-07-28 13:54:08
[date_mod] => 2022-07-28 13:54:08
[users_id_lastupdater] => 2
[status] => 5
[users_id_recipient] => 2
[requesttypes_id] => 1
[content] => <p>Texto de prueba</p>
[urgency] => 3
[impact] => 3
[priority] => 3
[itilcategories_id] => 0
[type] => 1
[global_validation] => 1
[slas_id_ttr] => 0
[slas_id_tto] => 0
[slalevels_id_ttr] => 0
[time_to_resolve] =>
[time_to_own] =>
[begin_waiting_date] => 2022-07-28 13:54:08
[sla_waiting_duration] => 0
[ola_waiting_duration] => 0
[olas_id_tto] => 0
[olas_id_ttr] => 0
[olalevels_id_ttr] => 0
[ola_ttr_begin_date] =>
[internal_time_to_resolve] =>
[internal_time_to_own] =>
[waiting_duration] => 1740
[close_delay_stat] => 0
[solve_delay_stat] => 422
[takeintoaccount_delay_stat] => 1
[actiontime] => 0
[is_deleted] => 0
[locations_id] => 0
[validation_percent] => 0
[date_creation] => 2022-07-28 13:18:06
)
[input] => Array
(
[id] => 27117
[status] => 5
[_no_history] =>
[_contract_types] => Array
(
)
[_date_creation_calendars_id] => Array
(
[0] => 1
[1] => 2
)
[_users_id_assign] => Array
(
)
[_users_id_requester] => Array
(
)
[_locations_id_of_requester] => 0
[users_default_groups] => 0
[_no_rule_matches] => 1
[users_id_lastupdater] => 2
[closedate] => NULL
)
[updates] => Array
(
[0] => status
[1] => date_mod
[2] => solvedate
[3] => begin_waiting_date
[4] => solve_delay_stat
)
[oldvalues] => Array
(
[status] => 2
[solvedate] =>
)
[history_blacklist] => Array
(
)
[auto_message_on_action] => 1
[no_form_page] =>
[additional_fields_for_dictionnary] => Array
(
)
[fkfield:protected] =>
[searchopt:protected] =>
[taborientation] => vertical
[get_item_to_display_tab] => 1
[usenotepad:protected] =>
[right] =>
[type:protected] => -1
[displaylist:protected] => 1
[showdebug] =>
[last_clone_index:protected] =>
)
{"user":"2@xxxx"}
No solutiontype_id present :C
see 2cd2715
When I set "no" to the option "single technician and group" I see in my tickets the other option as if my choice was "yes" and I´m not to able set two or more technicians. Is that a bug? Thanks in advance.
GLPi 9.5.7
Behaviors 2.6.0
Hello, good morning.
The GLPI is in version 9.5.9 and the Behaviors plugin is in version 2.5.0. The versions after this one, which are allowed for the mentioned GLPI version, are presenting a conflict with the Escalade plugin.
The Behaviors plugin has the option to assign the technician when resolving the ticket, but is assigning when performing any action on the ticket, is it possible to be assigning only when resolving the ticket?
Evidence:
As seen in the evidence, when creating a follow-up, I was assigned to the ticket.
Hi the plugin works in Glpi 10.0.02?
Bonjour,
Je rencontre un bug avec la nouvelle fonctionnalité "Ajout du technicien connecté à l'ajout d'un suivi" sur la version 2.6 pour GLPI 9.5.8.
J'ai par moment des techniciens qui n'ont pas ajouté de suivi, mais qui se retrouve avec des tickets en tant que technicien attribué alors que leur action n'était pas sur le ticket en question.
J'ai même eu le cas d'un demandeur via un formulaire formcreator qui s'est retrouvé technicien attribué d'un ticket qui n'avait rien avoir... Dans l'historique, j'ai pu voir que c'est le cron_mailgate qui a ajouté le demandeur, je ne sais pas trop pourquoi... ?
Glpi version 9.2.4
Plugin resources version 2.0.2
Good morning
I have a Question:
Is the plugin vulnerable to Log4shell (CVE-2021-44228)?
Thank you in advance for your answer
Regards
Hello,
I have a problem with ticket cloning in GLPI 9.5.9 with behaviors 2.6.0 & escalade 2.7.2 plugins.
I have an error "Requester is mandatory" each time I clone a ticket.
I have tried to set "requester mandatory" to "no" in behaviors configuration then create a new ticket -> same error.
I have tried to disable cloning settings to "no" in escalade plugin -> same error.
Any clues ?
Thanks a lot,
Regards
Add duration mandatory for tasks
I will do a PR for this feature
bonjour
glpi version 10.0.3
plugin behavior: 2.7.1
quand un technicien créé un ticket à la place de l'utilisateur, en demandeur il met le nom de l'utilisateur mais quand il sauvegarde le ticket son nom est ajouté en tant que demandeur.
Si on désactive le plugin behavior le problème ne se reproduit pas
merci
Is it possible to block the opening of a new ticket if you are satisfaction to respond?
Hello,
We encountered with the option "Single technician and group - single user and single group", when two technicians are positioned only the last one is positioned on the ticket without message. Is it possible to block the modification/creation of a ticket if there are several technicians in "Assigned to" field ?
GLPI version GLPI 10.0.5 and Behaviors 2.7.2
Sincerely,
There should be a option for allowing to assign a ticket only to technicians and not to Groups.
Also I can assign tickets to suppliers.. that' shouldn't be possible should it?
Bonjour,
la V2.7.1 du plugin est indiquée devant être utilisée avec une version 10.0.1 maxi de glpi.
Cela dit, le plugin reste fonctionnel avec une version 10.0.2 SAUF pour les profils self_service où l'affichage du ticket et des suivis est blanc : zero info, suivis, taches, etc ...
Pas de probleme pour les profils utilisant une interface standard
in the call number format, it is not letting you set other formats after selecting one of the formats and it doesn't even return to the default format, I've changed it several times and restart apache.
versão do GLPI 10.0.1
Debian 11
Hello,
The is_requester_mandatory won't work in my GLPI (10.0.2).
If i look here,
behaviors/inc/ticket.class.php
Line 302 in e1221bf
array(29) {
...
["_actors"]=>
array(3) {
["requester"]=>
array(1) {
[0]=>
array(4) {
["itemtype"]=>
string(4) "User"
["items_id"]=>
string(5) "123456"
["use_notification"]=>
int(1)
["alternative_email"]=>
string(29) "xxxxx@xxxxx"
}
}
["observer"]=>
array(0) {
}
["assign"]=>
array(0) {
}
}
...
}
Am i right or i miss something ?
Best regards
The plugin only gives this option to tickets. It would be nice if it gives this option to changes and problems too. Thanks :)
Bonjour,
Nous rencontrons un souci depuis la mise à jour vers GLPI (10.0.3).
Lors de l'ajout d'une solution à un ticket, si nous ne sélectionnons pas un type de solution (j'ai créé "résolu" et "non résolu"), alors le contenu de la solution est perdu, et un message indique que le type de solution est obligatoire pour clôturer un ticket.
Bien sûr, cela vient du fait que j'ai sélectionné cette option dans les paramètrages du plugin behaviors/comportements.
Mais nous n'avions pas ce problème en GLPI 9.5, le type "résolu" était sélectionné par défaut, de souvenir.
Est-ce qu'il y aurait moyen de paramétrer un type de solution par défaut quelque part ?
Merci d'avance.
Et un grand merci pour ce plugin qui rend depuis des années, un très bon service !
Michaël
If there is a task with ToDo type, when ticked the checkbox to set it as "done", If after that, I add a solution it doesn't recognize that the task is already done.
Steps To reproduce
Enter in a ticket
Create a new task with ToDo option
Exit and enter to the same ticket
Tick the Task as complete (tick the checkbox)
Add a Solution
A warning said: You cannot resolve the ticket - You cannot solve/close a ticket with task do to
and the button " + Add" is hidded.
If you refresh the page and add the solution now the button appear.
Bonjour,
L'option Ajout du technicien connecté à la résolution/clôture d'un ticket ajoute aussi les demandeur des tickets en tant que personne assignée alors que leur profil en leur permet pas (interface simplifié).
Merci.
Pierre
Since the GLPI 10.0.3 update, when creating a ticket from the standard interface, the technician who creates the ticket is systematically added as a requester in the same way as the designated requester.
Tthis issu only occurs when the behaviors plugin 2.7.2 is actived.
Hello,
It seems that when add a ticket manually (standard interface), the creator (i.e. technician or super-admin users) is added to requester field.
With plugin disabled this not occurs. The parameter to add automatically the user as requester is set as "NO".
GLPI - 10.0.3
Behaviors - 2.7.1
Thanks in advance!
Hi !
Yesterday, my GLPI was on GLPI 10.0.0 and the Behavior fonction "Take the first asking group" worked.
Today, I update to GLPI 10.0.2 and this fonction is always enable, but when I create a ticket, there is no group added.
Do you see any bug or just anything on my server ?
Thx
Correction :
@@ -363,16 +363,15 @@ class PluginBehaviorsTicket {
// No Auto set Import for external source -> Duplicate from Ticket->prepareInputForAdd()
if (!isset($ticket->input['_auto_import'])) {
if (!isset($ticket->input['_users_id_requester'])) {
- if ($uid = Session::getLoginUserID()) {
+ if ($uid == Session::getLoginUserID()) {
$ticket->input['_users_id_requester'] = $uid;
}
}
}
But $uid is not defined.. i think it's not used (old code)
With Behaviors Puligin, I can allow users to have a vue on there owned items and items owned by there groups, but I need setup there profils to use standard interface instead of simplified Interface.
Is there a solution to allow users to see assigned equipments to them in the simplified interface?
The problem is that some functions are only available in the simplified interface.
Example: Glpi Inventory plugin : self-service deployment
Hello,
it seems that the plugin does not work correctly for two parameters since the update to version 10.0.2 of glpi :
Requester is mandatory: if this behavior is activated, the manual creation of a ticket by a technician is impossible. even after placing the requester, the plugin blocks the creation of the ticket indicating "requester required"
Take the requester's group: this behavior works well with tickets by the mail collector or for tickets created from self-service. on the other hand, when a manual ticket is created by a technician, it does not assign the corresponding requester's group.
Have these issues been escalated? is a patch available?
Thanks in advance,
Bonjour
en version 10 de GLPI j'ai un petit souci avec le paramètre type de solution obligatoire.
La paramètre est bien sur OUI dans la configuration.
Si je rentre une solution sans mettre de type de solution, je n'ai pas de blocage, la solution est appliquée alors que ça devrait me refuser la solution (c'est le cas sur notre serveur en 9.5.6).
merci
version comportements 2.5.0 sur GLPI 10
Bonjour,
est-il prévu une version du plugin compatible GLPI V10 ?
Le plugin apporte de nombreuses options que je ne retrouve donc pas dans la V10 de façon native (où alors j'ai pas vu où)
Hello,
When I go to create a ticket I get the following error.
Uncaught Exception TypeError: in_array(): Argument #2 ($haystack) must be of type array, int given in /var/www/html/glpi/src/RuleTicketCollection.php at line 144
Glpi: 10.0.1
PHP: 8.1
If I deactivate the plugin there are no problems creating the tickets.
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.