View Issue Details

IDProjectCategoryView StatusLast Update
0007667mantisbtfeaturepublic2007-05-08 03:42
Reporterzend Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0a1 
Fixed in Version1.1.0a3 
Summary0007667: Use $_GET parameters instead of $_POST for searches
Description

Currently, (maybe it is because the full links in Mantis are saved in a session on the server side) I can't see the full link of a query I run in mantis.
i.e, when I select to view all issues that are resolved, I can a general link "http://localhost/mantis/view_all_bug_page.php" and not a link that is unique and can be then forwarded.
Look at Google Maps for instance, http://www.google.com/maps?hl=en&ie=UTF-8&oe=UTF-8&tab=wl&q= they have a button called "Link to this page" that provide you the full link to a map created that I can forward.

TagsNo tags attached.

Activities

vboctor

vboctor

2006-12-20 05:10

manager   ~0013851

Not all links will be unique. For example:

  • Project name is not part of simple filters.
  • "Current Project" for advanced filters.
  • "Myself"
  • Different users would have different access and hence get different results.

I wonder if the ability to forward links would be confusing if the results returned are not the same.

vboctor

vboctor

2007-03-27 02:07

manager   ~0014253

There are two options for implementing this:

  1. Allow a user to come up with some query and then request a link from Mantis. In this case, Mantis saves the current filter into the database and projects some sort of token (e.g. md5 digest). The link will look something like: http://www.mantisbt.org/bugs/search.php?id=XXXXXXXXXXXXXX

  2. Allow an construction of URL based on column names and values. For example, http://www.mantisbt.org/bugs/search.php?category=GUI&status=NEW . This option provides external tools with the ability to dynamically created filters. Examples of such tools include: MantisConnect clients, Firefox add-on, etc.

The second approach seems to provide more flexibility. I believe we can go ahead with this approach and leave it up to the author of the link to decide whether to use values like "Myself" or "Current Project" or to always specify the project.

The other thing to take into consideration is that the current filters are based on ids rather than names. For example, project id rather than name, status numeric value rather than label, etc. The decision to make is what to expect on dynamic GET queries.

The search.php script should apply the dynamic filter, then re-direct the browser to the View Issues page which should show the issues matching the filter.

zend

zend

2007-03-29 04:50

reporter   ~0014269

if it is not significantly harder (cost more) to implement,
We would like to go with option number two (the URL maker) it it should be part of the mantis GUI though.

ape

ape

2007-03-29 20:30

reporter   ~0014283

I've come across a few different cases now, though, where it would be useful to be able to simply cut-and-paste the current Mantis URL to be able to share information, especially when Mantis hosts more than one project:

  • Project changelogs
  • Project 'view issues' pages
  • Bug 0006479: Direct project link, is the general case, I suppose

Searches seem like another example.

In the first three cases, the only information missing from the URL is in the MANTIS_PROJECT_COOKIE. For searches it's in the POST and the cookie. The project ID would also be required for a GET style URL search as currently the project is inferred from the cookie setting.

A fair point about forwarded links being confusing if they produce different results for different users, but this would still be the case, even if you walked up to that other user's computer and selected the exact same search options as on theirs. Maybe this is simply the nature of any information system with many users with differing access levels.

ape

ape

2007-03-29 20:35

reporter   ~0014284

Another advantage of the second approach is that it would make it much easier to programmatically define searches. Or define searches in documentation, for example. "Click here for a list of unassigned bugs targeted for the 1.0 release of the TastyJamMaking project". Such searches would not have to be 'predefined' in Mantis itself and could be changed at will.

vboctor

vboctor

2007-04-16 02:26

manager   ~0014352

ape, the changelog and roadmap have a project_id GET parameter. If not supplied, it is defaulted to current project as per the cookie.

There is also a project_page.php which takes a project_id GET parameter. At the moment this redirects to View Issues page. In the future, it may show some project information, but then allow further navigation.

vboctor

vboctor

2007-04-18 01:37

manager   ~0014358

There is now a create permlink option in the filters box which creates a short URL using tinyurl.com which points to the full URL of the filter. Also search.php was updated to support the GET parameters.