PDA

View Full Version : custom field - report


Limak
03-06-05, 01:39 AM
I add new filed to tasks, now I need do report where values of this new filed will be a filter.
But in DB I can’t find any connections between tasks and custom filed.
How construct SQL question, where result can be show as list of tasks sorted by value of custom filed.

Please Help!

phoenix
07-06-05, 06:08 PM
I think that in your database, in the "custom_fields_values" table, the "value_object_id" attribute refers to the task linked with the field defined in the "custom_fields_struct" with the id "value_field_id".

For the SQL thing, it should be something like

SELECT 'value_object_id' FROM 'custom_fields_values' WHERE 'value_field_id'=theIDOfTheFieldYouNeed ORDER BY 'value_object_id'

where theIDOfTheFieldYouNeed is in the "custom_fields_struct" table (field_id matching the field_name you are seeking for).

Hope this helps.

noeleonoel
15-11-05, 10:36 AM
I'm trying to modify a copy of modules\projects\reports\tasklogs.php to filter on a custom field in a task.

If anyone has an example report.php in the vain of v2.x modules\projects\reports\*.php that filters tasks (or anything else) by a custom field(s). I would appreciate if you would share it with me.

Thanks.