glpi icon indicating copy to clipboard operation
glpi copied to clipboard

GLPI doesn't show who made the reservation in profile with simplified interface

Open phbotacin opened this issue 3 years ago • 13 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

10.0.2

Bug description

When the GLPI is accessed by a user with a simplified interface (Self-Service), he cannot see who made the reservations, he only displays the message "reserved by "

Follow screenshot attached.

image

Relevant log output

No response

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

Would it be possible to make it easier for interface profiles to see who made the reservation?

This function existed in GLPI version < 10

phbotacin avatar Aug 10 '22 13:08 phbotacin

The current logic only shows the user name if you have the standard interface and can read Reservations, or if it is your own reservation. There is no way for other simplified interface users to see who has the other reservations at this time.

The one thing that could be improved is the wording of the tooltip when the user's name is not visible/

cconard96 avatar Aug 10 '22 20:08 cconard96

Hello, is there no possibility then to make visible reservations for simplified interface profiles?

This is a pain we are facing with the new GLPI update. Is there a possibility this could be developed or is it out of scope?

phbotacin avatar Aug 11 '22 13:08 phbotacin

Hi,

Same problem here. Indeed, in versions < 10, the tooltip message displayed "Reserved by (user name)", even in the simplified interface.

lbonetti avatar Aug 11 '22 13:08 lbonetti

If it showed the information before GLPI 10, it may be a regression (and a bug) from when the reservations were reworked but I am not sure if it was intentional or not.

cconard96 avatar Aug 11 '22 13:08 cconard96

I believe it's a bug. Another problem we've noticed is that after a self-service user makes a reservation, the tooltip message of other people's reservations appears as if he made it itself (but cannot click and edit).

lbonetti avatar Aug 11 '22 14:08 lbonetti

GLPI versions < 10 , all had the tooltip message displayed "Reserved by (username)", even in the simplified interface. Is there a possibility this could be developed or is it out of scope?

phbotacin avatar Aug 11 '22 14:08 phbotacin

I was able to fix it by following these steps. https://github.com/glpi-project/glpi/issues/12009

Kalyeloficial avatar Aug 24 '22 15:08 Kalyeloficial

I was able to fix it by following these steps. #12009

Hello,

I made the change suggested in the point above. With this change it was possible to view the reservations of the day, those of the previous day or the following days it is not possible to view, but it is already an advance, thanks for the collaboration.

phbotacin avatar Aug 24 '22 19:08 phbotacin

We are also affected by this regression. Could we get back the behaviour of < 10 versions ?

Alwaysin avatar Aug 30 '22 08:08 Alwaysin

I was able to fix it by following these steps. #12009

Thank you, but this procedure did not solve the problem completely. The message now shows the name of the user who made the reservation, but it still doesn't show their comments, as it was in versions < 10.

reserva

In the example above, inside the reservation, there is a comment written by the user "teste", but it is not displayed.

lbonetti avatar Aug 31 '22 19:08 lbonetti

I was able to fix it by following these steps. #12009

Thank you, but this procedure did not solve the problem completely. The message now shows the name of the user who made the reservation, but it still doesn't show their comments, as it was in versions < 10.

reserva

In the example above, inside the reservation, there is a comment written by the user "teste", but it is not displayed.

I found a way to display the comments too, like in versions < 10. In the Reservations.php file, on line 559, I changed the original code:

? "\n" . sprintf(__("Reserved by %s"), $username)

To:

? "\n" . sprintf(__("Reserved by %s: %s"), $username, $data['comment'])

It worked for me, at least until we have an official solution: comments

lbonetti avatar Aug 31 '22 22:08 lbonetti

I was able to fix it by following these steps. #12009

Thank you, but this procedure did not solve the problem completely. The message now shows the name of the user who made the reservation, but it still doesn't show their comments, as it was in versions < 10. reserva In the example above, inside the reservation, there is a comment written by the user "teste", but it is not displayed.

I found a way to display the comments too, like in versions < 10. In the Reservations.php file, on line 559, I changed the original code:

? "\n" . sprintf(__("Reserved by %s"), $username)

To:

? "\n" . sprintf(__("Reserved by %s: %s"), $username, $data['comment'])

It worked for me, at least until we have an official solution: comments

Cara, tentei seguindo esse procedimento e mesmo assim não mostra os nomes, mas mostra os comentários. Queria que só mostrasse os nomes, mesmo fazendo o outro procedimento descrito acima não apareceu

ogd0ug avatar Sep 16 '22 16:09 ogd0ug

@ogd0ug use english only.

trasher avatar Sep 19 '22 06:09 trasher

This bug persists in version 10.0.3. I updated the version and it was necessary to do the above mentioned procedures again.

lbonetti avatar Oct 11 '22 23:10 lbonetti

Yes, for me it was the same, I updated to version 10.0.3 on a test server, the problem still continues, and it is necessary to carry out all the steps described above.

Kalyeloficial avatar Oct 13 '22 11:10 Kalyeloficial

This bug persists in version 10.0.5.

lbonetti avatar Nov 04 '22 12:11 lbonetti

I found a solution for this (and fixed a bug), that can also display comment and reserving user in the calendar. I will try to submit a PR for it but I'm not familiar with these programation languages. In Reservation.php replace 557-560 with :

                'comment'     => $data['comment'],
                'user'        => ($canedit_admin || $my_item
                              ? "$username"
                              : ""),

In reservation.js line 174 add :element.find(".fc-content, .fc-list-item-title").append("&nbsp;"+(extProps.user? extProps.user + " - ":"") + extProps.comment); in reservation.js line replace 191 with : content: extProps.comment + (extProps.user? " - " +extProps.user : ""),

flonou avatar Nov 16 '22 10:11 flonou

Self-service users are only supposed to be able to read details of a reservation made by someone else, this is not a bug.

cedric-anne avatar Nov 30 '22 07:11 cedric-anne

Self-service users are only supposed to be able to read details of a reservation made by someone else, this is not a bug.

Hi, cedric In my tests, the self-service users are not able to read reservations made by any other user, not even through the popup. Will it stay this way? If so, it's a drastic change compared to versions 9. At least if users can know who made the reservations through the popup, it makes internal communication a lot easier. Thanks.

lbonetti avatar Nov 30 '22 21:11 lbonetti

Does the self-service profile has read access on reservations ? I think it's required

flonou avatar Dec 01 '22 09:12 flonou

I also believe that it is necessary for the self-service profile to have access to read the reservations. Sometimes users can negotiate reservations with each other.

WgkLink avatar Dec 01 '22 11:12 WgkLink

Does the self-service profile has read access on reservations ? I think it's required

In the simplified interface, the "read" permission is omitted. Only the "make a reservation" permission can be enabled and, even with it, users can only see reservations made by themselves.

lbonetti avatar Dec 01 '22 12:12 lbonetti

We will try to add the READ permission on the self-service profile soon.

cedric-anne avatar Dec 15 '22 14:12 cedric-anne

The problem still occurs in version 10.9 Has anyone managed to do anything to really fix this? All the above solutions did not work for me.

HectorZanardo avatar Jul 25 '23 19:07 HectorZanardo

@HectorZanardo Indeed. They've added the "read" permission for reservations in Administration -> Profiles -> Self-service -> Tools

image

But even after checking it, it does not seem to work.

Alwaysin avatar Jul 26 '23 08:07 Alwaysin

@HectorZanardo Indeed. They've added the "read" permission for reservations in Administration -> Profiles -> Self-service -> Tools

image

But even after checking it, it does not seem to work.

Yes, even after enabling this function the problem still happens.

HectorZanardo avatar Jul 26 '23 11:07 HectorZanardo

I tried using GLPI 10.0.10, and the problem was resolved by adding the "read" permission for reservations.

image

abreuti avatar Nov 22 '23 14:11 abreuti