Skip to content

Fix tooltip display for cost comments#22963

Open
eduardomozart wants to merge 2 commits intoglpi-project:11.0/bugfixesfrom
eduardomozart:patch-45
Open

Fix tooltip display for cost comments#22963
eduardomozart wants to merge 2 commits intoglpi-project:11.0/bugfixesfrom
eduardomozart:patch-45

Conversation

@eduardomozart
Copy link
Contributor

The tooltip for Project Costs is always shown for comments, even when the comment is empty:

https://github.com/eduardomozart/glpi/blob/72414484de398740ae298021d728b11bf24f756c/src/ProjectCost.php#L364-L380

The tooltip is displayed unconditionally, regardless of whether there's actually a comment or not. The same issue exists in src/ContractCost.php at line 365.

To fix this, the tooltip should only be rendered when $data['comment'] is not empty.

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 # (issue number, if applicable)
  • Here is a brief description of what this PR does

Screenshots (if appropriate):

The tooltip for Project Costs is always shown for comments, even when the comment is empty:

https://github.com/eduardomozart/glpi/blob/72414484de398740ae298021d728b11bf24f756c/src/ProjectCost.php#L364-L380

The tooltip is displayed unconditionally, regardless of whether there's actually a comment or not. The same issue exists in src/ContractCost.php at line 365.

To fix this, the tooltip should only be rendered when $data['comment'] is not empty.
Fix tooltip display logic for comments in ContractCost.
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.

1 participant