formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

GLPI Object question type - not viewing group objects properly

Open felipebart10 opened this issue 4 years ago • 0 comments

Describe the bug I have a group that is on entity Root>Level1+Child entities. We have items belonging to this group which are on entity Root>Level1>Level2. Users from this group answer a form that is on Root+Childs entities, but these user's default entity is always Root>Level1>Level2, so the tickets are always opened on Root>Level1>Level2. My form has a "GLPI object" type question that I've chosen to show for the user only his or his group objects, but with these entities situation, this option is not working for this group in particular.

When both group and user's default entity are the same (let's say them both are on Root>Level1>Level2), the filter works correctly, only showing user's group items and his own items. But when the group is a level above user's default entity, the dropdown only shows user's items, and do not show items from his group. I discovered this by transfering the whole group to the child entity which was the user default entity. I think this is an error exclusive to FormCreator, since when I try to create a ticket from default glpi ticket form, the filter works fine. Maybe Is it a logic missing to check if something is recursive? Please remember that this group entity is marked as recursive, which means he's visible to child entities

To Reproduce Steps to reproduce the behavior:

  1. Set a group on entity "Root>Level1+Childs"
  2. Put some devices associated to this group on entity "Root>Level1>Level2"
  3. Set a test (self-service) user with default entity "Root>Level1>Level2" and associate one of those devices to him
  4. Activate that profile option to see only yours or your group's items when creating a ticket
  5. Try to answer a "itil object" question type on a form and notice that you can only see your own objects and your group's objects are missing.
  6. Try to open a ticket on the vanilla way and notice that you can see yours and your group's object normally

Expected behavior The filter should work as intended, showing both your and your group items

GLPI / Plugins (please complete the following information):

  • GLPI version 9.5.5 actualtime Name: ActualTime Version: 1.5.1 State: Enabled fields Name: Campos adicionais Version: 1.12.8 State: Enabled behaviors Name: Comportamentos Version: 2.5.0 State: Enabled formcreator Name: Form Creator Version: 2.12.3 State: Enabled fusioninventory Name: FusionInventory Version: 9.5+3.0 State: Installed / not activated mod Name: GLPI Modifications Version: 2.0.3 State: Enabled dashboard Name: Painel Version: 1.0.2 State: Enabled reservation Name: Reservation Version: 2.3.6 State: Not installed

Desktop (please complete the following information):

  • OS: Debian 11
  • Browser: Chrome

Additional context Add any other context about the problem here.

felipebart10 avatar Feb 04 '22 20:02 felipebart10