Skip to content

Fix: order item search options pointing to missing columns - #636

Open
Lainow wants to merge 1 commit into
11.0/bugfixesfrom
fix/order-item-search-options
Open

Lainow wants to merge 1 commit into
11.0/bugfixesfrom
fix/order-item-search-options

Conversation

@Lainow

@Lainow Lainow commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

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

  • Displaying the Product name (6) or Manufacturer's product reference (7) column in the order item search (front/search.php?itemtype=PluginOrderOrder_Item) made the search fail with a 500 error:
    Unknown column 'glpi_plugin_order_orders_items.name' in 'SELECT'.
    These options read name and reference_code from glpi_plugin_order_orders_items, which have no such columns. They now read name and manufacturers_reference from glpi_plugin_order_references (joined through plugin_order_references_id); the product name links to the reference.
  • Option 1 (price_ati) was labelled Unit price tax free and option 3 (price_taxfree) Discount (%): they are now labelled Price ATI and Unit price tax free, as in the order item list.
  • A unit test runs the search with every option displayed; without the fix it fails with the same SQL error.

Product name and manufacturer reference options read name and
reference_code from glpi_plugin_order_orders_items, which do not exist:
displaying them made the search fail with a SQL error. They now read
glpi_plugin_order_references. Price ATI and unit price tax free options
also had wrong labels.
@Lainow
Lainow requested review from a team, Herafia, Mary-Clb and Rom1-B and removed request for a team November 23, 2026 14:21
@Lainow Lainow self-assigned this Nov 23, 2026
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