{"action":"created","issue":{"url":"https://api.github.com/repos/glpi-project/glpi/issues/3578","repository_url":"https://api.github.com/repos/glpi-project/glpi","labels_url":"https://api.github.com/repos/glpi-project/glpi/issues/3578/labels{/name}","comments_url":"https://api.github.com/repos/glpi-project/glpi/issues/3578/comments","events_url":"https://api.github.com/repos/glpi-project/glpi/issues/3578/events","html_url":"https://github.com/glpi-project/glpi/issues/3578","id":298287363,"number":3578,"title":"[ 9.1.6 ] Concurrency modification on a ticket cause status  to regress","user":{"login":"sdicioccio81","id":34710634,"avatar_url":"https://avatars0.githubusercontent.com/u/34710634?v=4","gravatar_id":"","url":"https://api.github.com/users/sdicioccio81","html_url":"https://github.com/sdicioccio81","followers_url":"https://api.github.com/users/sdicioccio81/followers","following_url":"https://api.github.com/users/sdicioccio81/following{/other_user}","gists_url":"https://api.github.com/users/sdicioccio81/gists{/gist_id}","starred_url":"https://api.github.com/users/sdicioccio81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdicioccio81/subscriptions","organizations_url":"https://api.github.com/users/sdicioccio81/orgs","repos_url":"https://api.github.com/users/sdicioccio81/repos","events_url":"https://api.github.com/users/sdicioccio81/events{/privacy}","received_events_url":"https://api.github.com/users/sdicioccio81/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-19T14:06:59Z","updated_at":"2018-02-19T14:11:23Z","closed_at":null,"author_association":"NONE","body":"* Steps to reproduce (which actions have you made) :\r\n\r\n0-GLPI version 9.1.6 , choose a ticket initially on \"assigned\" status\r\n1- On an assigned assistance ticket one user start to write a follow up but DO NOT submit at thit time\r\n2- On the same assistance ticket another user DO plan a task => status of the ticket is now 'planned'\r\n3- The first user that was writing the follow up (in step 1) DO submit it just now\r\n\r\n* Expected result :  The ticket should be on \"planned\" status\r\n\r\n* Actual result :  The ticket \"regress\" to \"assigned status\r\n\r\n* URL of the page :  front/ticket.form.php\r\n\r\n* Screenshot of the problem (if pertinent) :\r\n\r\nWe can see some strange behavious in SQL logs\r\n\r\n**1st update (task) done by DI CIOCCIO Stéphane - Step 2**\r\nwe see that task is created and ticket status updated to '3' (planned)\r\n\r\nINSERT INTO \t`glpi_tickettasks` (`content`,`tickets_id`,`taskcategories_id`,`state`,`is_private`,`actiontime`,`users_id_tech`,`groups_id_tech`,`begin`,`end`,`users_id`,`date`,`date_creation`,`date_mod`) VALUES ('ajout tache ','2017002205','3','1','0','3600','11','0','2018-02-19 13:45','2018-02-19 14:45:00','11','2018-02-19 13:40:22','2018-02-19 13:40:22','2018-02-19 13:40:22')\r\nUPDATE \t\t`glpi_tickets`  SET `date_mod` = '2018-02-19 13:40:22', `users_id_lastupdater` = '11' WHERE `id` = '2017002205'\r\nUPDATE \t\t`glpi_tickets`  SET `actiontime` = '7200'  WHERE `id` = '2017002205'\r\n**=> UPDATE \t`glpi_tickets`  SET `status` = '3' WHERE `id` ='2017002205'**\r\nUPDATE \t\t`glpi_tickets`  SET `date_mod` = '2018-02-19 13:40:22' WHERE `id` ='2017002205'\r\nINSERT INTO \t`glpi_logs` (`items_id`, `itemtype`, `itemtype_link`, `linked_action`, `user_name`, `date_mod`, `id_search_option`, `old_value`, `new_value`)\r\n\t                VALUES ('2017002205', 'Ticket', '', '0', 'DI CIOCCIO Stephane (11) (11)', '2018-02-19 13:40:22', '12', '2', '3')\r\nINSERT INTO \t`glpi_logs` (`items_id`, `itemtype`, `itemtype_link`, `linked_action`, `user_name`, `date_mod`, `id_search_option`, `old_value`, `new_value`)\r\n                \tVALUES ('2017002205', 'Ticket', 'TicketTask', '17','DI CIOCCIO Stephane (11) (11)', '2018-02-19 13:40:22', '0','', '10938')\r\nINSERT INTO \t`glpi_events` (`items_id`,`type`,`date`,`service`,`level`,`message`) VALUES ('2017002205','ticket','2018-02-19 13:40:22','tracking','4','stephane_di_cioccio ajoute une tâche')\r\n\r\n\r\n**2nd update (followup) done by Manuel MAINDRON - Step 3**\r\nwe see that the follow up do modify back to status '2' (assigned') \r\n\r\nINSERT INTO \t`glpi_ticketfollowups` (`content`,`tickets_id`,`requesttypes_id`,`is_private`,`users_id`,`date`,`date_creation`,`date_mod`) VALUES ('TEST BUG TEST BUG','2017002205','0','0','12','2018-02-19 13:40:40','2018-02-19 13:40:40','2018-02-19 13:40:40')\r\nUPDATE \t\t`glpi_tickets`  SET `date_mod` = '2018-02-19 13:40:40', `users_id_lastupdater` = '12' WHERE `id` = '2017002205'\r\n**=> UPDATE \t`glpi_tickets`  SET `status` = '2' WHERE `id` ='2017002205'**\r\nUPDATE \t\t`glpi_tickets`  SET `date_mod` = '2018-02-19 13:40:40' WHERE `id` ='2017002205'\r\nINSERT INTO \t`glpi_logs`    (`items_id`, `itemtype`, `itemtype_link`, `linked_action`, `user_name`, `date_mod`, `id_search_option`, `old_value`, `new_value`)\r\n                \tVALUES ('2017002205', 'Ticket', '', '0', 'MAINDRON Manuel (12) (12)', '2018-02-19 13:40:40', '12','3', '2')\r\nINSERT INTO \t`glpi_logs`(`items_id`, `itemtype`, `itemtype_link`, `linked_action`, `user_name`, `date_mod`, `id_search_option`, `old_value`, `new_value`)\r\n                \tVALUES ('2017002205', 'Ticket', 'TicketFollowup', '17', 'MAINDRON Manuel (12) (12)', '2018-02-19 13:40:40', '0','', '96660')\r\nINSERT INTO \t`glpi_events` (`items_id`,`type`,`date`,`service`,`level`,`message`) VALUES ('2017002205','ticket','2018-02-19 13:40:40','tracking','4','manuel_maindron ajoute un suivi')\r\n\r\n\r\n* Your GLPI setup (you can find it in Setup > General menu, System tab) :\r\n\r\n[code]   GLPI 9.1.6 ( => /data/glpi/glpi-916/glpi)\r\n\r\nOperating system: Linux GLP-PREP-AMP01 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Dec 28 14:23:39 EST 2017 x86_64 PHP 7.1.8 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu, bcmath, bz2, \tcalendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, ldap, libxml, mbstring, mysqli, \tmysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, session, shmop, snmp, sockets, sqlite3, standard, sysvmsg, sysvsem, \tsysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib) Setup: max_execution_time=\"300\" memory_limit=\"128M\" post_max_size=\"2M\" safe_mode=\"\" session.save_handler=\"files\" \tupload_max_filesize=\"15M\"  Software: Apache () \tMozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Server Software: MySQL Community Server (GPL) \tServer Version: 5.6.37-log \tServer SQL Mode:  \tParameters: glpi@127.0.0.1/glpi_916 \tHost info: 127.0.0.1 via TCP/IP \t /data/glpi/glpi-916/glpi/config : OK /data/glpi/glpi-916/glpi/files : OK /data/glpi/glpi-916/glpi/files/_dumps : OK /data/glpi/glpi-916/glpi/files/_sessions : OK /data/glpi/glpi-916/glpi/files/_cron : OK /data/glpi/glpi-916/glpi/files/_graphs : OK /data/glpi/glpi-916/glpi/files/_lock : OK /data/glpi/glpi-916/glpi/files/_plugins : OK /data/glpi/glpi-916/glpi/files/_tmp : OK /data/glpi/glpi-916/glpi/files/_rss : OK /data/glpi/glpi-916/glpi/files/_uploads : OK /data/glpi/glpi-916/glpi/files/_pictures : OK /data/glpi/glpi-916/glpi/files/_log : OK SELinux mode is Enforcing SELinux boolean configuration for httpd_can_network_connect --> on SELinux boolean configuration for httpd_can_network_connect_db --> on SELinux boolean configuration for httpd_can_sendmail --> on\r\n\r\nhtmLawed version 1.1.21 in (/data/glpi/glpi-916/glpi/lib/htmlawed) phpCas version 1.3.5 in (/data/glpi/glpi-916/glpi/vendor/jasig/phpcas/source) PHPMailer version 5.2.23 in (/data/glpi/glpi-916/glpi/vendor/phpmailer/phpmailer) Zend Framework in (/data/glpi/glpi-916/glpi/vendor/zendframework/zend-loader/src) zetacomponents/graph in (/data/glpi/glpi-916/glpi/vendor/zetacomponents/graph/src) SimplePie version 1.5 in (/data/glpi/glpi-916/glpi/vendor/simplepie/simplepie/library) TCPDF version 6.2.12 in (/data/glpi/glpi-916/glpi/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/data/glpi/glpi-916/glpi/vendor/michelf/php-markdown/Michelf) true/punycode in (/data/glpi/glpi-916/glpi/vendor/true/punycode/src) iacaml/autolink in (/data/glpi/glpi-916/glpi/vendor/iamcal/lib_autolink) sabre/vobject in (/data/glpi/glpi-916/glpi/vendor/sabre/vobject/lib)\r\n\r\nServer: '10.49.64.25', Port: '389', BaseDN: 'dc=carrefour,dc=com', Connection filter: none, RootDN: \t\t'uid=readldap_redmine,ou=people,dc=corp,dc=carrefour,dc=com', Use TLS: none\r\n\r\nNot active\r\n\r\nWay of sending emails: SMTP (anonymous@smtp.services.hdf)\r\n\r\n \r\n\r\nfields               Name: Champs supplémentaires         Version: 1.6.2      State: Not installed \tbehaviors            Name: Comportements                  Version: 1.5.0      State: Enabled \ttag                  Name: Gestion des tags               Version: 2.0.1      State: Enabled \tmod                  Name: GLPI Modifications             Version: 1.1.2      State: Enabled \trenamer              Name: Renamer                        Version:            State: To be cleaned \tdashboard            Name: Tableau de bord                Version: 0.8.6      State: Enabled \tticketlink           Name: Ticketlink                     Version: 1.0.21     State: To be cleaned\r\n"},"comment":{"url":"https://api.github.com/repos/glpi-project/glpi/issues/comments/366704074","html_url":"https://github.com/glpi-project/glpi/issues/3578#issuecomment-366704074","issue_url":"https://api.github.com/repos/glpi-project/glpi/issues/3578","id":366704074,"user":{"login":"tomolimo","id":7569958,"avatar_url":"https://avatars0.githubusercontent.com/u/7569958?v=4","gravatar_id":"","url":"https://api.github.com/users/tomolimo","html_url":"https://github.com/tomolimo","followers_url":"https://api.github.com/users/tomolimo/followers","following_url":"https://api.github.com/users/tomolimo/following{/other_user}","gists_url":"https://api.github.com/users/tomolimo/gists{/gist_id}","starred_url":"https://api.github.com/users/tomolimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomolimo/subscriptions","organizations_url":"https://api.github.com/users/tomolimo/orgs","repos_url":"https://api.github.com/users/tomolimo/repos","events_url":"https://api.github.com/users/tomolimo/events{/privacy}","received_events_url":"https://api.github.com/users/tomolimo/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T14:11:23Z","updated_at":"2018-02-19T14:11:23Z","author_association":"CONTRIBUTOR","body":"Hello,\r\nYou should use the lock mechanism to prevent such issues, see:\r\n![image](https://user-images.githubusercontent.com/7569958/36381821-1ae2223c-1587-11e8-9083-24f25e63b119.png)\r\nregards,\r\nTomolimo"}}
{"actor":{"display_login":"tomolimo"}}