View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0024146||mantisbt||filters||public||2018-03-21 19:01||2018-03-31 19:58|
|Status||closed||Resolution||no change required|
|Target Version||Fixed in Version|
|Summary||0024146: Filtering in 'all projects' of custom dynamic fields doesn't work when selecting 'All projects'.|
When using an dynamic function as a listbox the options in the filter-box is gone. Only option 'any' is visible and selectable.
How am I able to fix this?
|Steps To Reproduce|
I have created one dynamic custom field of type 'enumeration' type using this function as an example:
I made the this dynamic custom field also visible within the filter-box in the 'View all page'.
When I am on the page 'View all' and I have selected one of the projects, the filter is working like expected. The items are visible in de listbox.
But when I select 'All Projects' the listbox only contains the option 'Any'. So therefore I am not able to filter over multiple (sub)projects.
|Tags||No tags attached.|
This is not a bug or feature request for MantisBT (you are asking for help on how to write a custom function). I am therefore resolving this issue as "no change required".
Please use the forums to get support on customizing and using MantisBT (refer to http://www.mantisbt.org/support.php for links and further details)
hmmm, i do not agree.
The function is working perfectly, but the items won't show in the filterbox when selecting a parent project or 'all projects'.
I made an extra table in Mantis for this function, 'mantis_custom_field_component_table'
1) when project_id = 0, it means it can be selected within any project.
When in the parent 'view all' page on 'all projects' it shows only the items where project_id = 0. And not the items in the sub-projects.
What the function does:
Code of the function:
Below the SQL code for the extra table:
Is this a regression? something that worked in a previous version of mantis, but now it doesn't for latest version?
In the wiki page it says:
I'm not familiar with those custom functions, so a detailed example of code will be helpful.
From what I see the functions does just what you implemented.
Thanks for your feedback. That clarifies it indeed!
So i have changed the SQL statement with:
With this new if else statement i also included sub-projects.
I have also made progress on the listed items per category, but only when updating a bug, not when reporting a new bug. :(
But we can close this issue. I'll will share my solution in the forum.
|2018-03-21 19:01||Marnix||New Issue|
|2018-03-21 19:45||atrol||Assigned To||=> atrol|
|2018-03-21 19:45||atrol||Status||new => resolved|
|2018-03-21 19:45||atrol||Resolution||open => no change required|
|2018-03-21 19:45||atrol||Note Added: 0059270|
|2018-03-22 05:09||Marnix||Note Added: 0059278|
|2018-03-22 05:19||cproensa||Note Added: 0059279|
|2018-03-22 05:27||atrol||Note Edited: 0059278||View Revisions|
|2018-03-22 05:32||atrol||Note Added: 0059280|
|2018-03-22 17:55||Marnix||Note Added: 0059291|
|2018-03-31 19:58||vboctor||Status||resolved => closed|