php-reports icon indicating copy to clipboard operation
php-reports copied to clipboard

ALL flag in variable header not working

Open iantic opened this issue 4 years ago • 1 comments

-- VARIABLE: { -- name: "topic", -- type: "select", -- database_options: { -- table: "ost_help_topic", -- column: "topic_id", -- display: "topic", -- all: true -- }

builds the following query:

SELECT * FROM ost_ticket where topic_id = 'ALL' ...

so it litterally passes 'ALL' instead of omitting the condition.

Addidionally, as noted in #260 , this property cannot be turned off

iantic avatar Sep 15 '20 15:09 iantic

This is why I do in the report: {% if facility != 'ALL' %} AND facilities.id = {{facility}} {% endif %}

aiso-net avatar Apr 12 '23 23:04 aiso-net