glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.1k stars 1.27k forks source link

All Actors added by rule are systematically droped after ticket update #10564

Closed stonebuzz closed 2 years ago

stonebuzz commented 2 years ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.0.0 RC1

Bug description

All Actors added (on ticket) by rule are systematically droped after ticket update

Relevant log output

No response

Page URL

No response

Steps To reproduce

  1. Create first rule (on create / update) which appen observer AAA when category name is AAA
  2. Create firts rule (on create / update) which append observer BBB when category name is BBB
  3. Create ticket with Category AAA -> Observer AAA is added
  4. Update ticket with category BBB -> Observer BBB is added and subsequently deleted (see history) image

Your GLPI setup information

Information about system installation and configuration
GLPI 10.0.0-rc1-git-master-26a36ecfbe (/GLPI/master => /home/stanislas/Teclib/dev/GLPI/master)
Installation mode: GIT
Current language:en_GB

Server
 
Operating system: Linux Desktop 5.4.0-94-generic #106-Ubuntu SMP Thu Jan 6 23:58:14 UTC 2022 x86_64
PHP 7.4.3 fpm-fcgi (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bz2, calendar, cgi-fcgi, ctype, curl, date,
    dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl,
    pcre, pdo_mysql, pdo_sqlsrv, posix, readline, session, shmop, sockets, sodium, sqlsrv, ssh2, standard, sysvmsg, sysvsem,
    sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="128M" safe_mode="" session.save_handler="files"
    upload_max_filesize="128M" 
Software: nginx/1.18.0
    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Server Software: (Ubuntu)
    Server Version: 8.0.28-0ubuntu0.20.04.3
    Server SQL Mode: STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
    Parameters: root@localhost/master
    Host info: Localhost via UNIX socket

PHP version (7.4.3) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, json, simplexml.
curl extension is installed.
gd extension is installed.
intl extension is installed.
libxml extension is installed.
zlib extension is installed.
Database engine version (8.0.28) is supported.
The log file has been created successfully.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_cache has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/config has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_cron has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_dumps has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_graphs has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_lock has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_pictures has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_plugins has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_rss has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_sessions has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_tmp has been validated.
Write access to /home/stanislas/Teclib/dev/GLPI/master/files/_uploads has been validated.
Web access to the files directory should not be allowed
Check the .htaccess file and the web server configuration.
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
zip extension is installed.
bz2 extension is installed.
Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /home/stanislas/Teclib/dev/GLPI/master/marketplace has been validated.
Timezones seems loaded in database.

GLPI constants
 
GLPI_ROOT: /home/stanislas/Teclib/dev/GLPI/master
GLPI_CONFIG_DIR: /home/stanislas/Teclib/dev/GLPI/master/config
GLPI_VAR_DIR: /home/stanislas/Teclib/dev/GLPI/master/files
GLPI_MARKETPLACE_DIR: /home/stanislas/Teclib/dev/GLPI/master/marketplace
GLPI_USE_CSRF_CHECK: 1
GLPI_CSRF_EXPIRES: 7200
GLPI_CSRF_MAX_TOKENS: 100
GLPI_USE_IDOR_CHECK: 1
GLPI_IDOR_EXPIRES: 7200
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: 
GLPI_TELEMETRY_URI: https://telemetry.glpi-project.org
GLPI_INSTALL_MODE: GIT
GLPI_NETWORK_MAIL: glpi@teclib.com
GLPI_NETWORK_SERVICES: https://services.glpi-network.com
GLPI_MARKETPLACE_ALLOW_OVERRIDE: 1
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: 1
GLPI_USER_AGENT_EXTRA_COMMENTS: 
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: 1
GLPI_AJAX_DASHBOARD: 1
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: 0
GLPI_CENTRAL_WARNINGS: 1
GLPI_DOC_DIR: /home/stanislas/Teclib/dev/GLPI/master/files
GLPI_CACHE_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_cache
GLPI_CRON_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_cron
GLPI_DUMP_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_dumps
GLPI_GRAPH_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_graphs
GLPI_LOCAL_I18N_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_locales
GLPI_LOCK_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_lock
GLPI_LOG_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_log
GLPI_PICTURE_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_pictures
GLPI_PLUGIN_DOC_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_plugins
GLPI_RSS_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_rss
GLPI_SESSION_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_sessions
GLPI_TMP_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_tmp
GLPI_UPLOAD_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_uploads
GLPI_INVENTORY_DIR: /home/stanislas/Teclib/dev/GLPI/master/files/_inventories
GLPI_NETWORK_REGISTRATION_API_URL: https://services.glpi-network.com/api/registration/
GLPI_MARKETPLACE_PLUGINS_API_URI: https://services.glpi-network.com/api/glpi-plugins/
GLPI_I18N_DIR: /home/stanislas/Teclib/dev/GLPI/master/locales
GLPI_VERSION: 10.0.0-rc1
GLPI_SCHEMA_VERSION: 10.0.0-rc1@4f12cc11183dfb486b84e28e8dad44a9259736c3
GLPI_MARKETPLACE_PRERELEASES: 1
GLPI_MIN_PHP: 7.4.0
GLPI_MAX_PHP: 8.2.0
GLPI_YEAR: 2022

Libraries
 
htmlawed/htmlawed version 1.2.6 in (/home/stanislas/Teclib/dev/GLPI/master/vendor/htmlawed/htmlawed)
phpmailer/phpmailer version 6.5.3 in (/home/stanislas/Teclib/dev/GLPI/master/vendor/phpmailer/phpmailer/src)
simplepie/simplepie version 1.5.8 in (/home/stanislas/Teclib/dev/GLPI/master/vendor/simplepie/simplepie/library)
mpdf/mpdf in (/home/stanislas/Teclib/dev/GLPI/master/vendor/mpdf/mpdf/src)
michelf/php-markdown in (/home/stanislas/Teclib/dev/GLPI/master/vendor/michelf/php-markdown/Michelf)
true/punycode in (/home/stanislas/Teclib/dev/GLPI/master/vendor/true/punycode/src)
iamcal/lib_autolink in (/home/stanislas/Teclib/dev/GLPI/master/vendor/iamcal/lib_autolink)
sabre/dav in (/home/stanislas/Teclib/dev/GLPI/master/vendor/sabre/dav/lib/DAV)
sabre/http in (/home/stanislas/Teclib/dev/GLPI/master/vendor/sabre/http/lib)
sabre/uri in (/home/stanislas/Teclib/dev/GLPI/master/vendor/sabre/uri/lib)
sabre/vobject in (/home/stanislas/Teclib/dev/GLPI/master/vendor/sabre/vobject/lib)
laminas/laminas-i18n in (/home/stanislas/Teclib/dev/GLPI/master/vendor/laminas/laminas-i18n/src)
laminas/laminas-servicemanager in (/home/stanislas/Teclib/dev/GLPI/master/vendor/laminas/laminas-servicemanager/src)
monolog/monolog in (/home/stanislas/Teclib/dev/GLPI/master/vendor/monolog/monolog/src/Monolog)
sebastian/diff in (/home/stanislas/Teclib/dev/GLPI/master/vendor/sebastian/diff/src)
donatj/phpuseragentparser in (/home/stanislas/Teclib/dev/GLPI/master/vendor/donatj/phpuseragentparser/src/UserAgent)
elvanto/litemoji in (/home/stanislas/Teclib/dev/GLPI/master/vendor/elvanto/litemoji/src)
symfony/console in (/home/stanislas/Teclib/dev/GLPI/master/vendor/symfony/console)
scssphp/scssphp in (/home/stanislas/Teclib/dev/GLPI/master/vendor/scssphp/scssphp/src)
laminas/laminas-mail in (/home/stanislas/Teclib/dev/GLPI/master/vendor/laminas/laminas-mail/src/Protocol)
laminas/laminas-mime in (/home/stanislas/Teclib/dev/GLPI/master/vendor/laminas/laminas-mime/src)
rlanvin/php-rrule in (/home/stanislas/Teclib/dev/GLPI/master/vendor/rlanvin/php-rrule/src)
blueimp/jquery-file-upload in (/home/stanislas/Teclib/dev/GLPI/master/vendor/blueimp/jquery-file-upload/server/php)
ramsey/uuid in (/home/stanislas/Teclib/dev/GLPI/master/vendor/ramsey/uuid/src)
psr/log in (/home/stanislas/Teclib/dev/GLPI/master/vendor/psr/log/Psr/Log)
psr/simple-cache in (/home/stanislas/Teclib/dev/GLPI/master/vendor/psr/simple-cache/src)
psr/cache in (/home/stanislas/Teclib/dev/GLPI/master/vendor/psr/cache/src)
league/csv in (/home/stanislas/Teclib/dev/GLPI/master/vendor/league/csv/src)
mexitek/phpcolors in (/home/stanislas/Teclib/dev/GLPI/master/vendor/mexitek/phpcolors/src/Mexitek/PHPColors)
guzzlehttp/guzzle in (/home/stanislas/Teclib/dev/GLPI/master/vendor/guzzlehttp/guzzle/src)
guzzlehttp/psr7 in (/home/stanislas/Teclib/dev/GLPI/master/vendor/guzzlehttp/psr7/src)
glpi-project/inventory_format in (/home/stanislas/Teclib/dev/GLPI/master/vendor/glpi-project/inventory_format/lib/php)
wapmorgan/unified-archive in (/home/stanislas/Teclib/dev/GLPI/master/vendor/wapmorgan/unified-archive/src)
paragonie/sodium_compat in (/home/stanislas/Teclib/dev/GLPI/master/vendor/paragonie/sodium_compat/src)
symfony/cache in (/home/stanislas/Teclib/dev/GLPI/master/vendor/symfony/cache)
html2text/html2text in (/home/stanislas/Teclib/dev/GLPI/master/vendor/html2text/html2text/src)
symfony/dom-crawler in (/home/stanislas/Teclib/dev/GLPI/master/vendor/symfony/dom-crawler)
twig/twig in (/home/stanislas/Teclib/dev/GLPI/master/vendor/twig/twig/src)
twig/string-extra in (/home/stanislas/Teclib/dev/GLPI/master/vendor/twig/string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 in (/home/stanislas/Teclib/dev/GLPI/master/vendor/symfony/polyfill-php80)

SQL replicas
 
Not active

Notifications
 
Way of sending emails: PHP

Plugins list
 
    fields               Name: Additionnal fields             Version: 1.13.0-rc1 State: Installed / not activated
    databaseinventory    Name: Database Inventory             Version: 0.0.5      State: Installed / not activated
    formcreator          Name: Form Creator                   Version: 2.12.4     State: Not installed
    geninventorynumber   Name: Inventory number generation    Version: 2.6.0-rc1  State: To update
    uninstall            Name: Item's Lifecycle (uninstall)   Version: 2.8.0      State: To update
    oauthsso             Name: oauthsso                       Version: 1.0.3      State: Not installed
    genericobject        Name: Objects management             Version: 2.12.0     State: To update
    order                Name: Orders management              Version: 2.7.3      State: Installed / not activated
    example              Name: Plugin Example                 Version: 7.1        State: Not installed
    treeview             Name: Tree view                      Version: 1.10.0-rc1 State: Installed / not activated
    workflows            Name: Workflows                      Version: 1.0.0-alpha-7 State: Not installed

Anything else?

No response

stonebuzz commented 2 years ago

This function seems to be involved

https://github.com/glpi-project/glpi/blob/26a36ecfbe427ffaaa5fc666f9d8e68e04e173b7/src/CommonITILObject.php#L7753-L7843

it is never aware of the actors added by the rules

cconard96 commented 2 years ago

Fixed by #10852.