View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0024600||mantisbt||filters||public||2018-07-10 06:20||2020-03-15 15:23|
|Target Version||2.24.0||Fixed in Version||2.24.0|
|Summary||0024600: BugFilterQuery - issue? - trying to add join & where conditions|
I need to do a customization on the query used to extract rows for the bug listing (view feature).
Because I was not able (my fault) to understand where the query is build and setted, the best solution I've found was to do changes on function filter_get_bug_rows()
I've tried to use $t_filter_query->add_join() and $t_filter_query->add_where() after :
Everything OK retrieving COUNT, but when doing $t_rows = $t_filter_query->fetch_all() it seems that the pieces I've added via ->add_join(); and ->add_where() were ignored.
Do you have any tip/hint/pointer to some documentation?
|Tags||No tags attached.|
if it works, probably we could give it a thought to be smarter and rebuild the internal query, automatically, at some point after adding external parts and before the actual execute
if you follow the BugFilterQuery class, it's build_main() method where all the filter properties are evaluated and added one by one
Thanks a lot for your fast answer.
and report if that fixes it?
MantisBT: master ec75a98d
Committer: dregad Details Diff
|BugFilterQuery check for later modifications
The internal sql query is built and ready after the constructor method,
and regenerated after changing query type with set_query_type().
However, if externally adding clauses throguh add_join(), add_where(),
etc, those new parts are not translated to the final query
Add a flag that keeps track of the modified state, so if the query is
executed after modifications, the internal sql is rebuilt.
|mod - core/classes/BugFilterQuery.class.php||Diff File|
|2018-07-10 06:20||fman||New Issue|
|2018-07-10 16:16||cproensa||Note Added: 0060237|
|2018-07-10 16:20||cproensa||Note Added: 0060238|
|2018-07-10 16:30||fman||Note Added: 0060239|
|2018-12-23 10:21||cproensa||Note Added: 0061093|
|2018-12-24 08:15||dregad||Description Updated||View Revisions|
|2020-01-28 07:04||dregad||Changeset attached||=> MantisBT master ec75a98d|
|2020-01-28 07:04||cproensa||Assigned To||=> cproensa|
|2020-01-28 07:04||cproensa||Status||new => resolved|
|2020-01-28 07:04||cproensa||Resolution||open => fixed|
|2020-01-28 07:04||cproensa||Fixed in Version||=> 2.24.0|
|2020-01-28 17:08||atrol||Target Version||=> 2.24.0|
|2020-03-15 15:23||vboctor||Status||resolved => closed|