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.24k stars 1.29k forks source link

Project automatic calculation project done #11128

Closed ArriMa closed 2 years ago

ArriMa commented 2 years ago

Code of Conduct

Is there an existing issue for this?

Version

9.5.7

Bug description

If automatically calculation option is ticked on a project, is not calculated if add or delete project task.

Relevant log output

No response

Page URL

No response

Steps To reproduce

  1. Open a project
  2. Be sure "Automatically calculate" is flagged
  3. If you add a new project task with a percent done (not like 0%) and save you will see the global percent done of project is not recalculate
  4. If you delete a project task you will see the global percent done of project is not update (should increase due less task to complete)

To recalculate: remove flag from "Automatically calculate" -> Save Project -> flag again "Automatically calculate" -> Save Project: now the percent is calculated correctly.

Your GLPI setup information

[code]   GLPI 9.5.7 (/glpi => /var/www/html/glpi) Installation mode: TARBALL Current language:en_GB -- Operating system: Linux SRVSIMS02 4.9.0-15-amd64 #1 SMP Debian 4.9.258-1 (2021-03-08) x86_64 PHP 7.4.18 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, bz2, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib) Setup: max_execution_time="30" memory_limit="2048M" post_max_size="30M" safe_mode="" session.save_handler="files" upload_max_filesize="10M" Software: Apache/2.4.25 (Debian) (Apache/2.4.25 (Debian) Server at sistemi.synlab.intranet Port 80) Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0 Server Software: Debian 9.13 Server Version: 10.1.48-MariaDB-0+deb9u2 Server SQL Mode: Parameters: root@localhost/glpi_prod Host info: Localhost via UNIX socket PHP version is at least 7.2.0 - Perfect! Sessions support is available - Perfect! Allocated memory > 64 Mio - Perfect! mysqli extension is installed ctype extension is installed fileinfo extension is installed json extension is installed mbstring extension is installed iconv extension is installed zlib extension is installed curl extension is installed gd extension is installed simplexml extension is installed intl extension is installed ldap extension is installed apcu extension is installed Zend OPcache extension is installed xmlrpc extension is installed exif extension is installed zip extension is installed bz2 extension is installed sodium extension is installed Database version seems correct (10.1.48) - Perfect! The log file has been created successfully. Write access to /var/www/html/glpi/files/_cache has been validated. Write access to /var/www/html/glpi/config has been validated. Write access to /var/www/html/glpi/files/_cron has been validated. Write access to /var/www/html/glpi/files has been validated. Write access to /var/www/html/glpi/files/_dumps has been validated. Write access to /var/www/html/glpi/files/_graphs has been validated. Write access to /var/www/html/glpi/files/_lock has been validated. Write access to /var/www/html/glpi/files/_pictures has been validated. Write access to /var/www/html/glpi/files/_plugins has been validated. Write access to /var/www/html/glpi/files/_rss has been validated. Write access to /var/www/html/glpi/files/_sessions has been validated. Write access to /var/www/html/glpi/files/_tmp has been validated. Write access to /var/www/html/glpi/files/_uploads has been validated. Write access to /var/www/html/glpi/marketplace has been validated. Web access to files directory is protected GLPI_ROOT: /var/www/html/glpi GLPI_CONFIG_DIR: /var/www/html/glpi/config GLPI_VAR_DIR: /var/www/html/glpi/files GLPI_MARKETPLACE_DIR: /var/www/html/glpi/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: TARBALL GLPI_NETWORK_MAIL: glpi@teclib.com GLPI_NETWORK_SERVICES: https://services.glpi-network.com GLPI_MARKETPLACE_PRERELEASES: GLPI_MARKETPLACE_ALLOW_OVERRIDE: 1 GLPI_MARKETPLACE_MANUAL_DOWNLOADS: 1 GLPI_USER_AGENT_EXTRA_COMMENTS: GLPI_AJAX_DASHBOARD: 1 GLPI_CALDAV_IMPORT_STATE: 0 GLPI_DEMO_MODE: 0 GLPI_FORCE_EMPTY_SQL_MODE: 1 GLPI_DOC_DIR: /var/www/html/glpi/files GLPI_CACHE_DIR: /var/www/html/glpi/files/_cache GLPI_CRON_DIR: /var/www/html/glpi/files/_cron GLPI_DUMP_DIR: /var/www/html/glpi/files/_dumps GLPI_GRAPH_DIR: /var/www/html/glpi/files/_graphs GLPI_LOCAL_I18N_DIR: /var/www/html/glpi/files/_locales GLPI_LOCK_DIR: /var/www/html/glpi/files/_lock GLPI_LOG_DIR: /var/www/html/glpi/files/_log GLPI_PICTURE_DIR: /var/www/html/glpi/files/_pictures GLPI_PLUGIN_DOC_DIR: /var/www/html/glpi/files/_plugins GLPI_RSS_DIR: /var/www/html/glpi/files/_rss GLPI_SESSION_DIR: /var/www/html/glpi/files/_sessions GLPI_TMP_DIR: /var/www/html/glpi/files/_tmp GLPI_UPLOAD_DIR: /var/www/html/glpi/files/_uploads 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: /var/www/html/glpi/locales GLPI_VERSION: 9.5.7 GLPI_SCHEMA_VERSION: 9.5.7 GLPI_MIN_PHP: 7.2.0 GLPI_YEAR: 2022 htmlawed/htmlawed version 1.2.5 in (/var/www/html/glpi/vendor/htmlawed/htmlawed) phpmailer/phpmailer version 6.1.6 in (/var/www/html/glpi/vendor/phpmailer/phpmailer/src) simplepie/simplepie version 1.5.6 in (/var/www/html/glpi/vendor/simplepie/simplepie/library) tecnickcom/tcpdf version 6.3.5 in (/var/www/html/glpi/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/var/www/html/glpi/vendor/michelf/php-markdown/Michelf) true/punycode in (/var/www/html/glpi/vendor/true/punycode/src) iamcal/lib_autolink in (/var/www/html/glpi/vendor/iamcal/lib_autolink) sabre/dav in (/var/www/html/glpi/vendor/sabre/dav/lib/DAV) sabre/http in (/var/www/html/glpi/vendor/sabre/http/lib) sabre/uri in (/var/www/html/glpi/vendor/sabre/uri/lib) sabre/vobject in (/var/www/html/glpi/vendor/sabre/vobject/lib) laminas/laminas-cache in (/var/www/html/glpi/vendor/laminas/laminas-cache/src) laminas/laminas-i18n in (/var/www/html/glpi/vendor/laminas/laminas-i18n/src) laminas/laminas-serializer in (/var/www/html/glpi/vendor/laminas/laminas-serializer/src) monolog/monolog in (/var/www/html/glpi/vendor/monolog/monolog/src/Monolog) sebastian/diff in (/var/www/html/glpi/vendor/sebastian/diff/src) elvanto/litemoji in (/var/www/html/glpi/vendor/elvanto/litemoji/src) symfony/console in (/var/www/html/glpi/vendor/symfony/console) scssphp/scssphp in (/var/www/html/glpi/vendor/scssphp/scssphp/src) laminas/laminas-mail in (/var/www/html/glpi/vendor/laminas/laminas-mail/src/Protocol) laminas/laminas-mime in (/var/www/html/glpi/vendor/laminas/laminas-mime/src) rlanvin/php-rrule in (/var/www/html/glpi/vendor/rlanvin/php-rrule/src) blueimp/jquery-file-upload in (/var/www/html/glpi/vendor/blueimp/jquery-file-upload/server/php) ramsey/uuid in (/var/www/html/glpi/vendor/ramsey/uuid/src) psr/log in (/var/www/html/glpi/vendor/psr/log/Psr/Log) psr/simple-cache in (/var/www/html/glpi/vendor/psr/simple-cache/src) mexitek/phpcolors in (/var/www/html/glpi/vendor/mexitek/phpcolors/src/Mexitek/PHPColors) guzzlehttp/guzzle in (/var/www/html/glpi/vendor/guzzlehttp/guzzle/src) guzzlehttp/psr7 in (/var/www/html/glpi/vendor/guzzlehttp/psr7/src) wapmorgan/unified-archive in (/var/www/html/glpi/vendor/wapmorgan/unified-archive/src) paragonie/sodium_compat in (/var/www/html/glpi/vendor/paragonie/sodium_compat/src) phpCas version 1.3.3 in (/usr/share/php) accounts Name: Accounts Version: 2.6.0 State: Enabled barcode Name: Barcode Version: 2.6.2 State: Enabled behaviors Name: Behaviours Version: 2.5.0 State: Enabled fields Name: Campi aggiuntivi Version: 1.12.9 State: Enabled datainjection Name: Data injection Version: 2.9.0 State: Enabled databases Name: Databases Version: 2.3.2 State: Enabled domains Name: Domains Version: 2.2.1 State: Not installed escalade Name: Escalation Version: 2.7.2 State: Enabled formcreator Name: Form Creator Version: 2.12.4 State: Enabled fusioninventory Name: FusionInventory Version: 9.5+3.0 State: Enabled order Name: Gestione ordini Version: 2.7.5 State: Enabled geninventorynumber Name: Inventory number generation Version: 2.5.1 State: Enabled addressing Name: IP Adressing Version: 2.9.1 State: Enabled itilcategorygroups Name: ItilCategory Groups Version: 2.0.1 State: Not installed mailanalyzer Name: Mail Analyzer Version: 2.0.2 State: Enabled oauthimap Name: Oauth IMAP Version: 1.1.0 State: Installed / not activated genericobject Name: Objects management Version: 2.11.0 State: Enabled pdf Name: Print to pdf Version: 2.0.0 State: Enabled manufacturersimports Name: Suppliers imports Version: 2.3.2 State: To update tasklists Name: Tasks list Version: 1.6.2 State: Enabled ticketmail Name: Ticket Mail Version: 3.4.0 State: Enabled webapplications Name: Web applications Version: 3.0.0 State: Enabled [/code]

Anything else?

I didn't test if the problem is present with sub-tasks too.

martinaluna commented 3 months ago

Hi! In my glpi 10.0.16 this bug happens. Attached is a document detailing the procedure. project-gantt-bug.docx