Syntax for filter

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mikem
Posts: 2
Joined: 30 Mar 2005, 21:04

Syntax for filter

Post by mikem »

Is it possible to pass parameters to view_all_bug_page.php (or something similar) so that I can customize what a user sees using a web address? Ifso, what is the syntax?

For example, I would like to be able to provide a link like the following on our website

...mantis/view_all_bug_page.php?filter=severity=blocker&show_columns=ID,Summary,Status

There are certain queries like this that I would like to provide direct links to without the user having to filter items. I do not care how complex the filtering syntax is since I'll just enter it once for the link. [another way to do this would be to pass a named filter, but I thought I read in another post that this is not available yet]

Alternatively, I could pass parameters to another one of the php files and include the results in my own page.

Thank you.
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

You can create the filter through view_all_set.php. You probably need to read through the code to see the mapping to fields.

Unfortunately, you can't set the project or the fields that are displayed.
mikem
Posts: 2
Joined: 30 Mar 2005, 21:04

Post by mikem »

I read through the code and thought I could enter something like
.../view_all_set.php?show_severity=block
but what results is a complete list, and the address in my browser shows something like
.../view_all_bug_page.php?filter=a:29:{s:13:%22show_category%22%3Ba:1:{i:0...

If you could provide a simple example of the syntax for showing a list where severity=block, that would give me a start for going forward.

Thank you.
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

Try .../mantisbt/view_all_set.php?type=1&show_severity=80

The parameter type=1 means create a new filter. The values for severity, etc, need to be converted to internal values.
Post Reply