You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-06-21 10:45:19

kyalpha
Member
Registered: 2022-06-17
Posts: 7

New ticket screen get refreshed reach time actor is changed

On new ticket screen, it's understandable that when I change Type or Category of the ticket, it's trying to load ticket template and reload the page.
But When i'm changing the Requester/Observer/AssignedTo, the screen also get refreshed. I feel frustration when trying to add multiple observer. 
Is there a config for this?

Offline

#2 2022-10-17 08:16:31

kyalpha
Member
Registered: 2022-06-17
Posts: 7

Re: New ticket screen get refreshed reach time actor is changed

kyalpha wrote:

On new ticket screen, it's understandable that when I change Type or Category of the ticket, it's trying to load ticket template and reload the page.
But When i'm changing the Requester/Observer/AssignedTo, the screen also get refreshed. I feel frustration when trying to add multiple observer. 
Is there a config for this?

Still looking forward for an answer...

Offline

#3 2022-10-19 20:27:43

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: New ticket screen get refreshed reach time actor is changed

I cannot recreate that issue. I can click in any of the actor fields and select a user/group multiple times. The page doesn't refresh until I hit save and create the ticket.
This is with the latest 10.0 bugfixes branch.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#4 2022-10-19 20:56:49

Rafumel1774
Member
Registered: 2019-05-11
Posts: 131

Re: New ticket screen get refreshed reach time actor is changed

What?! I can confirm and was always annoyed but thought this is normal!
@cconrad96 - please note it is only on the CREATE TICKET page. The tech will be added to the requester. When you remove him by backspace the page gets reloaded. When you add somebody the page is reloaded too.

Offline

#5 2023-05-18 12:47:34

Kallisti
Member
Registered: 2017-07-28
Posts: 19

Re: New ticket screen get refreshed reach time actor is changed

Hi - I just found this post looking for an issue to follow.

We have the same behaviour in our environment. Any change to the actors on the create ticket page leads to a full page reload.

We're on 10.0.7 and it's been like this since we upgraded to version 10. Happy to provide further details!

Offline

#6 2023-05-18 13:09:17

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: New ticket screen get refreshed reach time actor is changed

I confirm the behavior for new tickets. I do not know how I missed that before. I'm not sure the purpose, but this behavior was explicitly changed for new tickets/changes/problems when the UI was changed for GLPI 10.
The actor field template contains:

{% if item.isNewItem() %}
   {% set onchange = 'this.form.submit();' %}
{% endif %}

GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#7 2023-06-08 20:12:22

Kallisti
Member
Registered: 2017-07-28
Posts: 19

Re: New ticket screen get refreshed reach time actor is changed

There is an issue for this behavior now.
https://github.com/glpi-project/glpi/issues/14881
There is a proposed fix that will keep the behavior for requester but change it for the other actors.

Offline

#8 2023-06-09 01:57:54

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: New ticket screen get refreshed reach time actor is changed

The proposed fix is the best possible solution at the moment. At some point, the new data may be able to be retrieved over AJAX but that is a complex change and wouldn't be good for a bug-fix release.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#9 2023-09-18 10:19:44

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: New ticket screen get refreshed reach time actor is changed

How can it be fixed?

Offline

#10 2023-09-18 10:25:52

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: New ticket screen get refreshed reach time actor is changed

cconard96 wrote:

I confirm the behavior for new tickets. I do not know how I missed that before. I'm not sure the purpose, but this behavior was explicitly changed for new tickets/changes/problems when the UI was changed for GLPI 10.
The actor field template contains:

{% if item.isNewItem() %}
   {% set onchange = 'this.form.submit();' %}
{% endif %}

could this code be fixed?

Offline

#11 2023-09-18 13:34:41

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: New ticket screen get refreshed reach time actor is changed

It isn't broken. As I said, the code clearly shows the behavior is intentional.
If you mean the reloads just when changing observers and assigned techs, then it was already changed for 10.0.8.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#12 2023-09-18 13:58:59

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: New ticket screen get refreshed reach time actor is changed

yes, it works correct when changing\adding an observers or assigners, but not when requester.

what can we do to form not to be refreshed when adding\removing\changing a requester?

it is very important for us, because not all the users use forms to make a new ticket, but we or a person who responsible for acceptinn a new tickets needs to put it his or her(requesters) name.

is it possible to manually change this code page not refresh evert time?

or may be is it possible to make a new simple form for new ticket with possibility to choose a requester as it is when editing a simple ticket form of user

thanks


cconard96 wrote:

It isn't broken. As I said, the code clearly shows the behavior is intentional.
If you mean the reloads just when changing observers and assigned techs, then it was already changed for 10.0.8.

Last edited by repentandliveholy (2023-09-18 13:59:57)

Offline

#13 2023-09-18 16:02:22

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: New ticket screen get refreshed reach time actor is changed

also the same thing with changing categories..

Offline

#14 2023-09-19 01:43:09

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: New ticket screen get refreshed reach time actor is changed

There is a reason the page refreshes. The new selections need sent to the server to recalculate things like determine if a new ticket template needs applied or if the valid entities needs changes (in the case of changing the requester).
To expand on "At some point, the new data may be able to be retrieved over AJAX but that is a complex change and wouldn't be good for a bug-fix release.":
Currently, data like templates is computed when the form is loaded so reloading the page is required. Changing the code to work without a page reload will require a lot of changes to a complex part of the code for tickets, changes and problems.
That means it has to wait for a major release like 10.1 or 10.2, and also wait for a developer to have time available to work on it.

Any manual change to the code to prevent the reload would break the ticket templates, entity assignment and probably some other features.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#15 2023-09-19 08:29:27

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: New ticket screen get refreshed reach time actor is changed

Thank you very much for explanation. Yes, I got an idea that for now it is necessary. But, as you said, we can wait in future an update in which it would be made in other way, so that it would be needed to reload a page every time? If so - it is very good new and we wiil look forward for this update!

cconard96 wrote:

There is a reason the page refreshes. The new selections need sent to the server to recalculate things like determine if a new ticket template needs applied or if the valid entities needs changes (in the case of changing the requester).
To expand on "At some point, the new data may be able to be retrieved over AJAX but that is a complex change and wouldn't be good for a bug-fix release.":
Currently, data like templates is computed when the form is loaded so reloading the page is required. Changing the code to work without a page reload will require a lot of changes to a complex part of the code for tickets, changes and problems.
That means it has to wait for a major release like 10.1 or 10.2, and also wait for a developer to have time available to work on it.

Any manual change to the code to prevent the reload would break the ticket templates, entity assignment and probably some other features.

Offline

Board footer

Powered by FluxBB