Skip to content

[main] Fix - Injection form checks and CSV exports - #727

Draft
glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/717-to-main
Draft

glpi-project[bot] wants to merge 1 commit into
mainfrom
forward-port/717-to-main

Conversation

@glpi-project

@glpi-project glpi-project Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Forward-port of #717 to main.

Checklist before requesting a review

  • 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.

Description

  • Here is a brief description of what this PR does

Several small fixes in the injection workflow and the CSV/PDF exports.

Fix

  • Injection form: apply the model check result on the upload step, and output additional information values as text.
  • PDF report export: check the requested model before building the report, and escape the file name in the header.
  • Model field dropdowns (ajax/dropdownChooseField.php, ajax/dropdownMandatory.php): use the model right, as for the model form that calls them.
  • CSV exports: apply escapeCsvFormula() to the error file headers and to the model sample file (now written with fputcsv).
  • Error CSV: remove the temporary file even when the download fails.
  • Replace the remaining hand-written queries in inc/ with the query builder, and drop the unused PluginDatainjectionProfile::cleanProfiles().

Tests

  • AdditionalInformationTest: additional information values are output as text.
  • ClientInjectionEscapeCsvFormulaTest / ClientInjectionWriteErrorsCsvTest: headers and extra leading characters are handled.

@glpi-project

glpi-project Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin forward-port/717-to-main
git worktree add --checkout .worktree/forward-port/717-to-main forward-port/717-to-main
cd .worktree/forward-port/717-to-main
git reset --hard HEAD^
git cherry-pick -x c784dc882bf086510cea2d33f1f0e41cadc9b28c

@glpi-project glpi-project Bot mentioned this pull request Nov 30, 2026
3 tasks done
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