glpi
glpi copied to clipboard
Fix(core): Mutualize / harmonize linked item form / process / ui (Ticket / Problem / Change / TicketRecurrent)
Alternative to https://github.com/glpi-project/glpi/pull/15751
add _add_fromitem
as default value to be restored from restoreInputAndDefaults
(and keep the link to the asset when the Change
/ Problem
form is reloaded after changing the category)
Only for Change
and Problem
because it's actually worked for Ticket
and Ticket
has its own process (dedicated showform
/ dedicated code in front/ticket.form.php
/ dedicated code to get item entities_id
)
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #15358 |
This one sounds better. @Lainow could you confirm this solve original issue please?
This one sounds better. @Lainow could you confirm this solve original issue please?
I've just tested it and can confirm that it solves the problem.
Maybe the solution is to add the items panel to the changes and problems, and to handle the input in the same way.
@orthagh Do you agree?
Make the form item visible, if possible in future, if you have a choice where you can have similar code between all commonITILObject or an exception, prefers the first.
First attempt at pooling code for processing and displaying linked objects for CommonITILObject
@delcroip
Can you check this pull request (concerning this -> https://github.com/glpi-project/glpi/pull/11304)
Best regards
Each commit should be reviewed separately.
Commit 1: Mutualize the code to use the same code for changes and problems as the code already used for ticket<>items relation form/tab. Commit 2: Merge an included file into the only ajax script that is using it. Commit 3: Fix a bug that was previously existing.