Skip to content

Conversation

Lainow
Copy link
Contributor

@Lainow Lainow commented Oct 8, 2025

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes GLPI 11.0.0 ticket templates (predefined fields) #21313
  • Here is a brief description of what this PR does
    In the list of fields that can be selected as Predefined/Mandatory and Hidden Fields for a Ticket Template, the category and type were no longer visible. (Whereas they were visible in version 10.)

Screenshots (if appropriate):

@Lainow Lainow self-assigned this Oct 8, 2025
@Lainow Lainow requested a review from cconard96 October 8, 2025 15:19
@Lainow Lainow added the bug label Oct 8, 2025
@trasher trasher requested a review from cedric-anne October 8, 2025 16:08
@cconard96
Copy link
Contributor

Not sure. In GLPI 10, the behavior was:

Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See @cconard96 comments.

@Lainow Lainow requested a review from cedric-anne October 9, 2025 13:05
@cedric-anne cedric-anne added this to the 11.0.2 milestone Oct 9, 2025
* @return bool
**/
public static function showForITILTemplate(ITILTemplate $tt, $withtemplate = 0): bool
public static function showForITILTemplate(ITILTemplate $tt, $withtemplate = 0, $withtypeandcategory = true): bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure modifying this function is necessary, as it is only called once and with $withtypeandcategory set to false. So, on line 144, the code remains $fields = $tt->getAllowedFieldsNames(false); as in the original version.

Suggested change
public static function showForITILTemplate(ITILTemplate $tt, $withtemplate = 0, $withtypeandcategory = true): bool
public static function showForITILTemplate(ITILTemplate $tt, $withtemplate = 0): bool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GLPI 11.0.0 ticket templates (predefined fields)

5 participants