glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.01k stars 1.26k forks source link

Updates possible on Closed ITILObjects #13910

Open VladoTTX opened 1 year ago

VladoTTX commented 1 year ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.6

Bug description

It is possible to edit several things even on Closed ITIL Objects (Tickets, Changes.. ). On Fields panel it is possible:

Items tab:

Also I think "Save" button should be hidden in case Close tickets. Not sure if this is meant as feature but I think on Closed items, no editing should be possible.

Priority and Linking change needs "Saving" and this is prevented later in code in CommonITILObject::handleTemplateFields() but without warning message. But Unlinking from fields panel succeeds.

Some fixes are possible like changing: https://github.com/glpi-project/glpi/blob/9b141106b8458b0377887e7b25da416f4af195fb/templates/components/itilobject/fields/priority_matrix.html.twig#L78 to 'disabled': (not (canupdate and canpriority)),

Or updating footer.twig to not display Save button but maybe it would be possible to achieve by redefining more can* methods in CommonITILObject and include getClosedStatusArray() checks inside to avoid code repeating.

Relevant log output

No response

Page URL

No response

Steps To reproduce

  1. Create ticket
  2. add Item
  3. Close ticket
  4. As Admin Change Priority
  5. Add Item on main page fields panel
  6. Unlink Item on main page fields panel
  7. In tab Items unlink Item via Massive Actions

Your GLPI setup information

No response

Anything else?

No response

cedric-anne commented 1 year ago

Hi,

I agree we should not be able to change the priority of a closed ITIL object.

Being able to link new elements may be legitimate, as sometimes, technician may have forgot to include this item when change was processed and just want to complete the list.