glpi icon indicating copy to clipboard operation
glpi copied to clipboard

Bug on "Priority" field on tickets templates

Open LeonardoSilvaSilva opened this issue 2 months ago • 5 comments

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • [x] I have searched the existing issues

Version

11.0.4

Bug description

The field "Priority" do not Follow the predefined value in the ticket template. Here is my ticket template ("Very Low" as the Predefined Value for the field Priority):

Image Image

The ticket creation page is provided below. The template in the first page is a very limited, forcing the user to change the Entity in order to change the ticket template to see the other fields:

Image

After changing the Entity, new fields are shown (Priority is still Very Low, as predefined in the new ticket template for the Entity chosen):

Image

But after changing the Category to "_Ourtos", the value of Priority change to the sistem default value (medium):

Image

Even after the ticket is open, the Priority value do not follow the predefined value in the template.

Image

There is no rules for tickes that change the value, so there is no reason why the valoe do not folow the value predefined in the ticker template.

Here is the "_Outros" category configuration page, showing that the ticket template for this category is "Chamados Usuários STVSEN" (the one shown above, which wave the "Very low" as a predefined value for the field "Priority").

Image

I already changed every other predefined values on the template and almost all off then follows the pre-defined values in the ticket template when I open a new ticket ("almost" because I do not tried all of then, there are many...) The value of the field Priority is the only one who don't.

What others informations can I provide to help you determine if it is a bug or not?

Relevant log output

I do not have access to the servers. I am only a frontend user. The access policy of my company makes very difficult for me to access the server.

Page URL

https://glpi-......./front/ticket.form.php

Steps To reproduce

  1. create a ticket template with the "Very Low" predefined value for the field "Priority".
  2. Associate the ticket template to an Entity in \GLPI\Entities\Assistance\Templates Configuration\Ticket template.
  3. Associate the ticket template to a category in \GLPI\Setup\Dropdowns\Assistance\ITIL Category\choose the category\ITIL Category\Template for an Incident.
  4. Open a new ticket using a user with the permission on the Entity in question.
  5. After changing the category field, the 'priority' field should remain at 'Very Low' (as configured), but instead, it automatically changes to 'Medium' in real time, even before the ticket is submitted.

Your GLPI setup information

GLPI information
GLPI: 11.0.4 ( => /var/www/glpi)
Installation mode: TARBALL
Current language: en_US
Source Integrity: 1 files changed
  D: install/install.php
Server
Operating system: Linux glpi-7dcbc44b9f-v94f4 5.15.0-163-generic #​173-Ubuntu SMP Tue Oct 14 17:51:00 UTC 2025 x86_64

PHP: 8.3.6 fpm-fcgi

PHP extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache

Setup: disable_functions="" max_execution_time="30" max_input_vars="1000" memory_limit="128M" post_max_size="8M" session.cookie_secure="0" session.cookie_httponly="1" session.cookie_samesite="Strict" session.save_handler="files" upload_max_filesize="2M"

Web server: nginx/1.24.0 ()

User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0

Database:

Server Software: mariadb.org binary distribution

Server Version: 11.0.6-MariaDB-ubu2204

Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Parameters: glpi@mariadb:3306/glpi

Host info: mariadb via TCP/IP

Requirements: PHP version (8.3.6) is supported. OS and PHP are relying on 64 bits integers. Sessions configuration is OK. Allocated memory is sufficient. Following extensions are installed: dom, fileinfo, filter, libxml, simplexml, tokenizer, xmlreader, xmlwriter. mysqli extension is installed curl extension is installed gd extension is installed intl extension is installed mbstring extension is installed zlib extension is installed bcmath extension is installed The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present. openssl extension is installed Database engine version (11.0.6) is supported. The log file has been created successfully. Write access to /var/www/glpi/files/_cache has been validated. Write access to /var/www/glpi/files/_cron has been validated. Write access to /var/www/glpi/files has been validated. Write access to /var/www/glpi/files/_graphs has been validated. Write access to /var/www/glpi/files/_lock has been validated. Write access to /var/www/glpi/files/_pictures has been validated. Write access to /var/www/glpi/files/_plugins has been validated. Write access to /var/www/glpi/files/_rss has been validated. Write access to /var/www/glpi/files/_sessions has been validated. Write access to /var/www/glpi/files/_tmp has been validated. Write access to /var/www/glpi/files/_uploads has been validated.

Sessions configuration is secured. exif extension is installed ldap extension is installed Following extensions are installed: bz2, Phar, zip. Zend OPcache extension is installed Following extensions are installed: ctype, iconv, sodium. Write access to /var/www/glpi/marketplace has been validated. Timezones seems loaded in database.

GLPI constants
GLPI_ROOT: "/var/www/glpi"
GLPI_VERSION: "11.0.4"
GLPI_SCHEMA_VERSION: "11.0.4@9065df1ff6b8ff1d77b519d1c4856507d18258b0"
GLPI_FILES_VERSION: "11.0.4-1d4fbe9a"
GLPI_MIN_PHP: "8.2"
GLPI_MAX_PHP: "8.5"
GLPI_YEAR: "2025"
GLPI_I18N_DIR: "/var/www/glpi/locales"
GLPI_ENVIRONMENT_TYPE: "production"
GLPI_CONFIG_DIR: "/var/www/glpi/config"
GLPI_VAR_DIR: "/var/www/glpi/files"
GLPI_MARKETPLACE_DIR: "/var/www/glpi/marketplace"
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST: ["~^\n                        (http|https|feed)://
# protocol\n (\n (?:\n
(?:xn--[a-z0-9-]++\.)+xn--[a-z0-9-]++ # a domain name using punycode\n
|\n (?:[\pL\pN\pS\pM\-\]++\.)+[\pL\pN\pM]++ # a multi-level domain name\n |\n [a-z0-9\-\]++
# a single-level domain name\n )\.?\n |
# or\n \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
# an IP address\n | # or\n \[\n
(?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::))))\n \] # an IPv6 address\n
)\n (?:/ (?:[\pL\pN\pS\pM\-._\~!$&'()
+,;=:@]|%[0-9A-Fa-f]{2})* )* # a path\n
(?:\? (?:[\pL\pN\-._\~!$&'\\+,;=:@/?]|%[0-9A-Fa-f]{2}) )? # a query (optional)\n
$~ixuD"] GLPI_DISALLOWED_UPLOADS_PATTERN: "/\.(php\d*|phar)$/i" GLPI_TELEMETRY_URI: "https://telemetry.glpi-project.org" GLPI_INSTALL_MODE: "TARBALL" GLPI_NETWORK_MAIL: "[email protected]" GLPI_NETWORK_SERVICES: "https://services.glpi-network.com" GLPI_MARKETPLACE_ENABLE: 3 GLPI_MARKETPLACE_PRERELEASES: false GLPI_MARKETPLACE_ALLOW_OVERRIDE: true GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true GLPI_USER_AGENT_EXTRA_COMMENTS: "" GLPI_DOCUMENTATION_ROOT_URL: "https://links.glpi-project.org" GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: "1" GLPI_LOG_LVL: "warning" GLPI_SKIP_UPDATES: false GLPI_STRICT_ENV: false GLPI_AJAX_DASHBOARD: "1" GLPI_CALDAV_IMPORT_STATE: 0 GLPI_CENTRAL_WARNINGS: "1" GLPI_SYSTEM_CRON: false GLPI_TEXT_MAXSIZE: "4000" GLPI_WEBHOOK_ALLOW_RESPONSE_SAVING: "0" GLPI_WEBHOOK_CRA_MANDATORY: false GLPI_ALTCHA_MODE: "interactive" GLPI_ALTCHA_MAX_NUMBER: 50000 GLPI_ALTCHA_EXPIRATION_INTERVAL: "PT20M" GLPI_DOC_DIR: "/var/www/glpi/files" GLPI_CACHE_DIR: "/var/www/glpi/files/_cache" GLPI_CRON_DIR: "/var/www/glpi/files/_cron" GLPI_GRAPH_DIR: "/var/www/glpi/files/_graphs" GLPI_LOCAL_I18N_DIR: "/var/www/glpi/files/_locales" GLPI_LOCK_DIR: "/var/www/glpi/files/_lock" GLPI_LOG_DIR: "/var/www/glpi/files/_log" GLPI_PICTURE_DIR: "/var/www/glpi/files/_pictures" GLPI_PLUGIN_DOC_DIR: "/var/www/glpi/files/_plugins" GLPI_RSS_DIR: "/var/www/glpi/files/_rss" GLPI_SESSION_DIR: "/var/www/glpi/files/_sessions" GLPI_TMP_DIR: "/var/www/glpi/files/_tmp" GLPI_UPLOAD_DIR: "/var/www/glpi/files/_uploads" GLPI_INVENTORY_DIR: "/var/www/glpi/files/_inventories" GLPI_THEMES_DIR: "/var/www/glpi/files/_themes" GLPI_PLUGINS_DIRECTORIES: ["/var/www/glpi/marketplace","/var/www/glpi/plugins"] GLPI_NETWORK_API_URL: "https://services.glpi-network.com/api" GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/" GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/marketplace/"
LDAP Directories
Server: 'ad.senado.gov.br',
Port: '389',
BaseDN: 'DC=senado,DC=gov,DC=br',
Connection filter: none,
RootDN: 'aplic-secs-plone',
Use TLS: none
SQL Replicas
Not active
Notifications
Way of sending emails: SMTP(smtp://smtp-appl:25)
Plugins list
fields               Name: Campos adicionais              Version: 1.23.1     State: Enabled
Install Method: Marketplace behaviors Name: Comportamentos Version: 3.0.1 State: Enabled
Install Method: Marketplace escalade Name: Escalonamento Version: 2.10.0 State: Not Installed
Install Method: Marketplace gantt Name: gantt Version: 1.2.0 State: Enabled
Install Method: Marketplace datainjection Name: Importação de dados Version: 2.15.2 State: Enabled
Install Method: Marketplace mreporting Name: Mais Relatórios Version: 1.9.1 State: Enabled
Install Method: Marketplace treeview Name: Tree view Version: 1.20.0 State: Enabled
Install Method: Marketplace

Anything else?

No response

LeonardoSilvaSilva avatar Dec 09 '25 23:12 LeonardoSilvaSilva

I think I just figure out the what is happening. While testing other fields to see if they would behave wrongly as "Priority" field, I applied predefined values on both fields "Urgency" and "Impact" in a ticket template. For my surprise, the value of the Priority do not follow the predefined value in the template because it is following the value determined for the "Matrix of Calculus for Priority" using Urgency and Impact values.

Image

I understand that the matrix is calculating the value of the field Priority correctly based on the Urgency and impact fields, but, it makes the "Priority Predefined Value" in a ticket template useless (because I did not set any predefined value for Urgency and Impact). I found a way to solve my situation by setting the pre-defined values for Urgency and Impact as very low too in the ticket template. But I really think this is a Workaround solution. Not the strict correct solution, considering the Priority value changed just after I change the category Field but before a submit the ticket (before, it was right as "Very Low", as it should be). But it is just my conclusion, guys... If I'm wrong, please let me know.

LeonardoSilvaSilva avatar Dec 10 '25 00:12 LeonardoSilvaSilva

I came back with news, guys. I thought my Workaround solution had worked, but it didn't.

It only works while you let the fields Urgency and Impact visible in the template. The moment you hide then, they ignore the predefined values too and switch back to the default values (Medium for both). Hide the fields in the template is the key to reproduce the problem.

If you:

  1. define both Urgency and Impact as "Very Low" and let them both visible, the priority will be Very Low (because Very Low + Very Low = Very Low):
Image
  1. define both Urgency and Impact as "Very Low", show one of them and hide the other, the priority will be Low (because the value you hide, switch back to the value "Medium", and Very Low + Medium = Low):
Image
  1. define both Urgency and Impact as "Very Low", but hide both, the priority will be Medium (because both values you hide, switches back to Medium, and Medium + Medium = Medium):
Image
  1. define Urgency as Very High and Impact as "Very Low", but hide Impact, the priority will be High (because Impact switches back to Medium when you hide it, and Very High + Medium = High):
Image

And for the other values, the same behavior is shown. So There is no escape. There is no way to choose a Predefined Value to the Priority field in tickets template if you do not set or hide Urgency and/or Impact. Both need to be set and both need to be visible. I came back to my original problem: how to predefine Priority field in ticket template hiding Urgency and Impact? I'm opened to suggestions.

Thanks.

LeonardoSilvaSilva avatar Dec 10 '25 01:12 LeonardoSilvaSilva

Hello I didn't see any issue on my side, the priority is well defined. Maybe the category got a default ticket template that is different and that's why it's not applied when you changed the category.

You can verify that here : /front/itilcategory.php

Image

froozeify avatar Dec 10 '25 08:12 froozeify

Hello I didn't see any issue on my side, the priority is well defined. Maybe the category got a default ticket template that is different and that's why it's not applied when you changed the category.

You can verify that here : /front/itilcategory.php Image

Before open this report issue, I did this verification you suggest. In my first post I presented the page you suggest me to verify. Can you see it in my first post? Is there some error in the post that prevent you to see it? If so, please let me know.

LeonardoSilvaSilva avatar Dec 10 '25 17:12 LeonardoSilvaSilva

I Just found another weird behavior on this (possible) bug. After choose the category, the value of field Priority switch to "Medium" (as I explained earlier). The image below shows the value of Priority after been switched from the predefined "Very Low" Value to "Medium".

Image

But an interesting thing happens if you try to submit the ticket with a mandatory field not filled (or with another error): the value of the field Priority switch back to the predefined value "Very Low".

Image

I really believe there's something wrong here.

LeonardoSilvaSilva avatar Dec 10 '25 21:12 LeonardoSilvaSilva

Like Leonardo, I have a problem with priority, which no longer calculates itself automatically.... I mainly use forms. The template I use most often is “self-service”. Urgency is often assigned at the "targets" (now “destinations” in the French version). The impact is at the discretion of the control tower.

mrniko31 avatar Dec 17 '25 12:12 mrniko31

Isn't it related? https://github.com/glpi-project/glpi/issues/21946

mrniko31 avatar Dec 17 '25 12:12 mrniko31

While trying to debug your issue I discovered this bug, isn't your issue related to that https://github.com/glpi-project/glpi/issues/22316

froozeify avatar Dec 17 '25 12:12 froozeify

While trying to debug your issue I discovered this bug, isn't your issue related to that #22316

In the #22316 issue, the problem is that the fields do not become visible ou hidden after changing categories. In my case, the problem is that the value of the field is not been calculated correctly after changing categories. The reported incorrect behaviors are different. But I agree with you that they could be related to the same origin (I strongly believe that).

LeonardoSilvaSilva avatar Dec 17 '25 23:12 LeonardoSilvaSilva