Skip to content

fix(searchoption): default value not displayed when field is not set#985

Merged
Rom1-B merged 4 commits into
pluginsGLPI:mainfrom
MyvTsv:ticket38487_3
Jul 30, 2025
Merged

fix(searchoption): default value not displayed when field is not set#985
Rom1-B merged 4 commits into
pluginsGLPI:mainfrom
MyvTsv:ticket38487_3

Conversation

@MyvTsv
Copy link
Copy Markdown
Contributor

@MyvTsv MyvTsv commented Jul 23, 2025

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !38487
  • When creating an object that has fields in a tab created by the field plugin, if the fields have a default value, they are not saved to the database. In this case, I check whether the row is saved to the database. If the value is not present, the default value is displayed.

Screenshots (if appropriate):

Before:
image

After:
image

@MyvTsv MyvTsv self-assigned this Jul 23, 2025
@MyvTsv MyvTsv requested a review from Rom1-B July 23, 2025 09:26
@MyvTsv MyvTsv marked this pull request as ready for review July 23, 2025 09:26
Comment thread inc/abstractcontainerinstance.class.php Outdated
MyvTsv and others added 2 commits July 23, 2025 14:08
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@Rom1-B Rom1-B left a comment

Choose a reason for hiding this comment

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

Seems OK.
Please have the customer approve it and we'll merge it afterwards.

@MyvTsv
Copy link
Copy Markdown
Contributor Author

MyvTsv commented Jul 30, 2025

It's good for the customer

@MyvTsv MyvTsv requested a review from Rom1-B July 30, 2025 13:07
@Rom1-B Rom1-B merged commit 0d09e0d into pluginsGLPI:main Jul 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants