formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

Profile "Simplified interface" does not view tickets from other users

Open phamorais opened this issue 3 years ago • 25 comments

Describe the bug When trying to search for tickets opened by other people in my group (simplified interface), only my name is displayed

To Reproduce Steps to reproduce the behavior:

  1. Log in to GLPI with "Simplified interface" profile
  2. Click on "My requests for assistance"
  3. Select "Issue - Requester"> "is"> "another user's name"
  4. Only my name is displayed.

Expected behavior The name of all users in my group should be displayed

Screenshots

  1. Click on "My requests for assistance"

image

  1. Select "Issue - Requester"> "is"> "another user's name" and Only my name is displayed.

image

In previous versions, the list with all users was shown

image

Obs: All users are in the same entity

GLPI 9.5.5 Formcreator 2.11.3

2.11.3

phamorais avatar May 21 '21 00:05 phamorais

Hi

This behaviour is by design, to match the users drop-down of a new ticket form in simplified interface of GLPI.

More investigation needed: I will check if glpi allows groups as you described.

btry avatar May 21 '21 04:05 btry

@btry I did not understand.

From what I saw in previous versions, see the gif below.

In a user with a simplified interface, I use the search with the option "Requester"> is>

See that it will introduce several users.

see all

If I use the option "Items seen"> "Contains"> Username

all tickets are displayed.

image

However the expected behavior is that the list of users should be presented for selection, instead of typing the name, as it was previously.

phamorais avatar May 21 '21 11:05 phamorais

Hi

In the previous versions the drop-down displays all available users. You're right. However, if you disable the service catalog and use the simplified interface (native to GLPI), you will see that you cannot view other users in related dropdowns. Check it when you create a ticket.

The change in version 2.11.3 is intended, as Formcreator shall not permit more than the simplified interface. In my opinion, showing all users was a security problem, which was also reported by some (glpi experts) admins.

If glpi allows to show users who are members of the current group I will search a solution for that. If not, I will consider that the plugin behaves as expected.

If you are allowed to filter by users with the "contains" operator, I also need to check how this is possible in the simplified interface (without Formcreator). Maybe the plugin is still too much permissive.

Maybe you should consider to grant some users the helpdesk interface, not the simplified interface.

I hope you understand better the "background" of this change.

btry avatar May 21 '21 16:05 btry

Final note for today: I answered from a mobile device, I hope I did not missed an important detail in your report. I'll double check next week and add comments if needed.

btry avatar May 21 '21 16:05 btry

@btry

I understand perfectly.

In fact, a 'global' list is never good. If you analyze, for example, the list for the issue "Technician group" it also brings a global list. That is, you do not show users globally, but you show the group (which is also not good)

image

I realize that it is necessary to evolve the plugin referring to these 2 themes, and that it is not something so 'simple'.

GLPI already has the relationship between the logged in user and the group in which he is a member. So, my suggestion is that you use this relationship to filter the list of Users and Groups that are offered for a simplified interface.

Something similar to see users and groups only in the where the user is part or that you have something in your profile that frees you from seeing more items.

image

phamorais avatar May 21 '21 16:05 phamorais

Indeed, groups will probably need a fix. However I might reach a limitation in the GLPI framework to fix the dropdowns.

Stay tuned, I'll investigate deeper.

btry avatar May 21 '21 16:05 btry

Thank you very much for your cordial help.

phamorais avatar May 21 '21 16:05 phamorais

Hello @btry , I am not very good at development, but I noticed something here.

  1. The GLPI table "glpi_groups_users" makes the relationship between User x Group

So my suggestion for improvement would be:

a) In the user profile, if you have the option "See Group Ticket", the drop-down list should bring only users who are part of the same group as the person using the filter;

image

Then, by selecting the question "Requester", the users in which he is a member will appear

b) in the group filter, bring only the groups in which that person is part

Thank you for your help

phamorais avatar May 26 '21 11:05 phamorais

Hi

Yes, this is probably the best way to solve the problem.

Technically, I need to update the search options in the inc/issue.class.php

  • removing the 'id' restriction for users related search options, and use instead an more complex condition.
  • add a condition to group related search options

I don't know yet when I'll have time for that. I'll try to target the next release. Either 2.11.4 or 2.12.0 (depending on the progress of the 2.12.0 development).

btry avatar May 26 '21 11:05 btry

@btry thanks!

phamorais avatar Jun 07 '21 15:06 phamorais

Hi

Many improvements were done in the service catalog about SQL filtering.

This issue needs a review based on the version 2.12.0.

@phamorais can you test and feedback ?

btry avatar Jul 02 '21 07:07 btry

@btry Hi!

Good Morning!

I'm currently on 2.11.4,

I'm going to update to version 2.12 beta, and I'll bring you feedback.

phamorais avatar Jul 02 '21 11:07 phamorais

Hi

I merged today some improvemetns related to issues. If you have skills, please use latest revision of support/2.12.0 . I'm considering to release a beta.2 to include those changes and collect up to date feedbacks.

Thank you for your help

btry avatar Jul 05 '21 13:07 btry

@btry thx!

Updated as per latest revision.

Continues with the same behavior. When filtering by "Requester" > "is", only our name appears.

image

phamorais avatar Jul 06 '21 12:07 phamorais

OK, thanks. I'll investigate quickly to find how to fix that.

btry avatar Jul 06 '21 12:07 btry

@btry Thanks for the feedback

I updated to version 2.12.1 and the problem still persists. I still think the suggestion below is the best option to solve.

Hello @btry , I am not very good at development, but I noticed something here.

  1. The GLPI table "glpi_groups_users" makes the relationship between User x Group

So my suggestion for improvement would be:

a) In the user profile, if you have the option "See Group Ticket", the drop-down list should bring only users who are part of the same group as the person using the filter;

image

Then, by selecting the question "Requester", the users in which he is a member will appear

b) in the group filter, bring only the groups in which that person is part

Thank you for your help

phamorais avatar Aug 19 '21 15:08 phamorais

@btry Hi!

UP!

phamorais avatar Apr 26 '22 13:04 phamorais

Hi

I'm reviewing this issue with GLPI 10 context and Formcreator 2.13.0-beta.

I notice that relying on the right "see Group ticket" is not a good idea : this right allows you to see the tickets associated to the groups you belong to. It is not related to tne right to see some groups in filters.

I also notice that in GLPI self service (service catalog disabled) the user cannot filter tickets by technicial group. Only requester group is acessible. See the screenshot below.

Then the plugin should probably not show the equivalent search option for assistance requests.

image

btry avatar Apr 27 '22 07:04 btry

Hi @phamorais

Do you have opportunity to test Formcreator 2.13.0-beta.1 with the above fix ?

btry avatar May 11 '22 07:05 btry

Hi @btry , sorry for the delay.

I'll do the tests until next Friday and give you a feedback ok?

Thank you for your support.

phamorais avatar May 17 '22 02:05 phamorais

@btry

Hello Btry!

Lets go the example below

I have an entity "Test Entity"

In this case I have the group called "Orion".

Users Fernando1 and Marcelo are part of the "Orion" group

image

But when the user "Fernando" is logged in, and uses the filter "Request" > "is" > The name of the other user "Marcelo" does not appear. That is, the error remains.

image

phamorais avatar May 18 '22 23:05 phamorais

Hi

The "requester" search criteria is limited because the simplified interface of GLPI does this restriction. If Fernando is logged in with the simplified interface (overriden by the service catalog) then this behavior is normal.

See this commit : https://github.com/pluginsGLPI/formcreator/commit/b576a501efc68a3e82d111a6ee85837d676fe399

EDIT: i'm realizing we are going back to the beginning of the thread. I need to read it again and I'l do a sumup to get in a single place all useful data, without garbage.

btry avatar May 20 '22 06:05 btry

Sumup :

The need is to fond all users in the groups if the current user to show them in the "requester" search criteria.

Currently in simplified interface GLPI and Formcreator show the current user and a special entry "myself"

btry avatar May 20 '22 08:05 btry

I removed the technicial group criteria as it is not allowed in GLPI native simplified interface (this is a fix).

As GLPI itself does not provides the feature you asked, adding it in Formcreator is not an ehnamcement but a feature to add.

From my point of view I think there is no negative impact to implement it.

As far as I know you have a subscription then you may request a quote to develop this feature in GLPI + Formcreator.

btry avatar May 20 '22 08:05 btry

Hi!

In this case, it is an internally necessary improvement, but we are not interested in sponsoring it yet. I believe that making the issue open on github will allow other users to contribute.

phamorais avatar May 05 '23 21:05 phamorais