pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
173 stars 125 forks source link

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

Open phamorais opened 3 years ago

phamorais commented 3 years ago

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

btry commented 3 years ago

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.

phamorais commented 3 years ago

@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.

btry commented 3 years ago

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 commented 3 years ago

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.

phamorais commented 3 years ago

@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

btry commented 3 years ago

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.

phamorais commented 3 years ago

Thank you very much for your cordial help.

phamorais commented 3 years ago

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

btry commented 3 years ago

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

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).

phamorais commented 3 years ago

@btry thanks!

btry commented 3 years ago

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 ?

phamorais commented 3 years ago

@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.

btry commented 3 years ago

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

phamorais commented 3 years ago

@btry thx!

Updated as per latest revision.

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

image

btry commented 3 years ago

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

phamorais commented 3 years ago

@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 commented 2 years ago

@btry Hi!

UP!

btry commented 2 years ago

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 commented 2 years ago

Hi @phamorais

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

phamorais commented 2 years ago

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 commented 2 years ago

@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

btry commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.

phamorais commented 1 year ago

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.