Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A behavior not expected #1852

Closed
mecmav opened this issue Jul 3, 2020 · 17 comments
Closed

A behavior not expected #1852

mecmav opened this issue Jul 3, 2020 · 17 comments
Assignees

Comments

@mecmav
Copy link

mecmav commented Jul 3, 2020

Hello, I don't know exactly if this is a bug, but I will try to explain any step

I have 2 entities: Root entity and some other child entity named Entity 1.
So I have ticket categories, models, rules for each entity.

I was created a self-service profile and a user assigned to it.

Look to this behavior: the user of that entity have a self-service profile. When log in glpi GUI, it's loads the simple interface, so can open a ticket and that will appear on Assistance>Tickets of their entity. In the Destination Entity config field I set "Default requester user's entity". So far so Good.

But the problem is: when a technician or any other, for example, needs to put the status ticket to pending because any reason.

Now, the ticket will appear to the requester user with the status pending.
If the requester user write a followup, the ticket status changes automatically from "Pending" to "New".

I'd reviewed rules, entities, child entities, ticket models, and I don't know if I'm wrong with my configs or the behavior it's acting as unexpected.

Would someone can give me a help with that ?

Setup:

Form Creator formcreator 2.10.0

[code]   GLPI 9.4.6 ( => /var/www/html/glpi) Installation mode: TARBALL

Operating system: Linux 276a16edf50f 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 PHP 7.3.9-1~deb10u1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zlib) Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files" upload_max_filesize="2M" Software: Apache/2.4.38 (Debian) (Apache/2.4.38 (Debian) Server at 192.168.0.42 Port 8080) Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0 Server Software: MySQL Community Server (GPL) Server Version: 5.7.23 Server SQL Mode: Parameters: glpiuser@192.168.0.42/glpi Host info: 192.168.0.42 via TCP/IP 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 xml extension is installed ldap extension is installed imap extension is installed Zend OPcache extension is installed APCu extension is installed xmlrpc extension is installed CAS extension is installed exif extension is installed Database version seems correct (5.7.23) - Perfect! /var/www/html/glpi/files/_log : OK /var/www/html/glpi/config : OK /var/www/html/glpi/files : OK /var/www/html/glpi/files/_dumps : OK /var/www/html/glpi/files/_sessions : OK /var/www/html/glpi/files/_cron : OK /var/www/html/glpi/files/_graphs : OK /var/www/html/glpi/files/_lock : OK /var/www/html/glpi/files/_plugins : OK /var/www/html/glpi/files/_tmp : OK /var/www/html/glpi/files/_cache : OK /var/www/html/glpi/files/_rss : OK /var/www/html/glpi/files/_uploads : OK /var/www/html/glpi/files/_pictures : OK Web access to the files directory should not be allowed but this cannot be checked automatically on this instance. Make sure acces to error log file is forbidden; otherwise review .htaccess file and web server configuration.

htmLawed version 1.2.4 in (/var/www/html/glpi/lib/htmlawed) phpmailer/phpmailer version 6.0.7 in (/var/www/html/glpi/vendor/phpmailer/phpmailer/src) simplepie/simplepie version 1.5.3 in (/var/www/html/glpi/vendor/simplepie/simplepie/library) tecnickcom/tcpdf version 6.3.2 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/vobject in (/var/www/html/glpi/vendor/sabre/vobject/lib) zendframework/zend-cache in (/var/www/html/glpi/vendor/zendframework/zend-cache/src) zendframework/zend-i18n in (/var/www/html/glpi/vendor/zendframework/zend-i18n/src) zendframework/zend-serializer in (/var/www/html/glpi/vendor/zendframework/zend-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) leafo/scssphp in (/var/www/html/glpi/vendor/leafo/scssphp/src) phpCas version 1.3.6 in (/usr/share/php/CAS/source)

Not active

Way of sending emails: PHP

 

formcreator Name: Form Creator Version: 2.10.0 State: Enabled
[/code]

@btry
Copy link
Collaborator

btry commented Jul 3, 2020

Hi

This would mean that when the ticket changes the entity of the ticket changes in an unexpected way.

Could you create a ticket as self service, then check in the database the value of entities_id for the created ticket. Next update its status from a technicial user and check again the value if entities_id for this ticket.

It should not change. Please compare the current entity if each user against the value in the table. This may be useful.

@mecmav
Copy link
Author

mecmav commented Jul 3, 2020

So, firstly thanx for the fast reply.

I'm trying to create a ticket from the entity 1, because user are in entity 1.

I tryed what you sayed, the results:

-->I create a ticket from the simply interface with an user self-service profile.
In glpi_tickets, I have the entity_id 1

-->I did log in the glpi with an technician user, and updated the ticket status to "Pending".
In glpi_tickets, keep the entity_id=1 and only status changed from "2" to "4".

-->Again I was login with the self service user that created the ticket. I can see the ticket with the status "Pending".

-->I put a followup, and the ticket changes to the "New".

What can be that ?

@mecmav

This comment has been minimized.

@btry
Copy link
Collaborator

btry commented Jul 3, 2020

HI

In your screenshots, I don't see anything showing that the ticket changes its status to new after adding a followup. Did you miss a screenshot ?

Also I notice several things you need to follow for better communication (to ensure I understand you correctly, for efficiency).

1 - let's focus on the entity problem and we will see the status problem later
2 - i think you confused ticket and request for assistance . They are not the same thing

Ticket is an object stored in glpi_tickets, available in GLPI's UI.

A request for assistance is an object stored in glpi_plugin_formcreator_issues. Its content is somewhat a merge of tickets and form answers. Distinguishing all those types is important to ensure I fully understand the description of your problem.

I believe that your issue will be rather complicated to investigate. I cannot work on it now, but I'll allocate some time next week to try to reproduce. You provided useful material to build a similar context in my environment, but I expect I will need some more data. Please stay tuned next week.

@btry btry self-assigned this Jul 3, 2020
@mecmav
Copy link
Author

mecmav commented Jul 3, 2020

Now I understand.

Sorry, I really was confused. Now I'm verified the table glpi_plugin_formcreator_issues, and reproduce again the behavior.

The entities_id field has not been changed in the glpi_plugin_formcreator_issues table after inserting the followup.

@btry
Copy link
Collaborator

btry commented Jul 3, 2020

Sorry, I really was confused

No problem : this plugin is now complex enough to present a learning curve to newcomers.

The entities_id field has not been changed in the glpi_plugin_formcreator_issues table after inserting the followup.

this is a nice : I can exclude such bug and am happy about that.

I'm reading again your 1st post. I realize that the entity does not change in the ticket or assistance request and there is only this problem of status going back to new (my bad). Do you observe this unexpected status in the assistance request AND the associated ticket ?

@mecmav
Copy link
Author

mecmav commented Jul 3, 2020

I will try again:

1 step: in the simple interface, I will create a ticket from a user with self service profile

image

image

ticket created
image

2 step: I will change to pending status, from a technician user

image

image
Save

3 step: now I'm simplified interface again with the user who made the request

image

detail in glpi_plugin_formcreator_issues database printscreen. everything is fine (my entities_id is 1 ans status = 4(pending)) correctly BEFORE insert followup

image

now I will put a followup in the ID t_1

image

after insert

image

image

after insert the followup, in the table glpi_plugin_formcreator_issues keep the same values

@btry
Copy link
Collaborator

btry commented Jul 3, 2020

I'm suspecting that GLPI updates the status to processing because no technician added any followup. I you try to reproduce the same workflow without Formcreator, you probably observe the same result.

@mecmav
Copy link
Author

mecmav commented Jul 3, 2020

even though I had other previous accompaniments, the behavior is the same

@mecmav
Copy link
Author

mecmav commented Jul 9, 2020

Hello,

After the announcement of GLPI 9.5 release, I download that and deploy a test instance with a new install.

After finish deploy, installed the last release of the plugin and the behavior are the same yet.

When a user with a self-service profile insert a followup in a pendent ticket, the ticket changes automatically the status to the new value "New".

@btry
Copy link
Collaborator

btry commented Jul 10, 2020

Hi

I began to investigate yesterday, and continued today.

I don't reproduce. At the end of the workflow the ticket has status "processng (assigned)"

image

Do you have an other plugin which may affect the tickets (like Behaviors) ?

@mecmav
Copy link
Author

mecmav commented Jul 10, 2020

Hello.

I haven't any other plugins. Only a formcreator and a glpi 9.5 clean install.

Maybe because you have ticket rules active.

The entity who's doing the request is a entity 1, child of root entity.

@btry
Copy link
Collaborator

btry commented Jul 27, 2020

Hi

I'm resuming investigation. I observed the behavior of GLPI when I follow the same workflow without the plugin. After ading a followup, the ticket gets the status Processing (assigned)

The only business rules in my instance are the default ones, to set a location from an asset or a user.

As I think that the entity context is not relevant regarding the issue, I did everything in the root entity.

An information is missing to understand the reason of the behavior you observe.

@mecmav
Copy link
Author

mecmav commented Jul 27, 2020

What information you need?

@mecmav
Copy link
Author

mecmav commented Jul 27, 2020

For example, if we insert a followup using the default interface with the user glpi, the tocket keep with the status pending.

Now, if we put a followup in a pending ticket with an user that have simplified interface assigned, using the formcreator interface,the ticket will change to processing.

@btry
Copy link
Collaborator

btry commented Oct 26, 2020

Hi

What information you need?

I don't know. There is probably something different bewen your isntance and mine which makes the difference of behavior.

IS your issue still happening ?

@btry
Copy link
Collaborator

btry commented Apr 25, 2023

Hi

Having no feedback, and this issue being obsolete, I close.

@btry btry closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants