Mantis

Filter on sub-proj categories in MyReport

Posted by artgroup 
Filter on sub-proj categories in MyReport
September 06, 2008 02:44AM
I would like to add a filter on the query that select the categories to be visualized in the report form.

A simple query like this:
select category from mantis_project_category_table where project_id='xx'

will return only the Categories name for that project or sub-project. I tried to have a look to the code and find where is the query but with no success.
Could you help me?

Cris by ArtGroup

Mantis: 1.1.2
PHP: 5.2.5
SQL: MySQL 5.0.51a
OS: XP SP2
Re: Filter on sub-proj categories in MyReport
September 06, 2008 07:54AM
The SLQ query to change is in the core/print_api.php file (function print_category_option_list) but I will not affect only the report page, it will affect all pages.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Filter on sub-proj categories in MyReport
September 07, 2008 02:12AM
thanks a lot.

Even I'm not an expert it seems that this code works:

#-- Original code
#$query = "SELECT DISTINCT category
# FROM $t_mantis_project_category_table
# WHERE [color=#0033CC][b]$t_project_where[/b][/color]
# ORDER BY category";

#-- Modified to filter out parent Project
$query = "SELECT DISTINCT category
FROM $t_mantis_project_category_table
WHERE [color=#FF0000][b]project_id = $c_project_id[/b][/color]
ORDER BY category";

if you find something wrong, please let me know.

many many thanks.

Cris by ArtGroup

Mantis: 1.1.2
PHP: 5.2.5
SQL: MySQL 5.0.51a
OS: XP SP2
Sorry, only registered users may post in this forum.

Click here to login



Online Users

Guests: 36
Record Number of Users: 1 on April 02, 2023
Record Number of Guests: 115 on November 09, 2023
Top Users
Hébergeur : Morinie.Fr