Opened 19 years ago
Closed 19 years ago
Last modified 17 years ago
#844 closed defect (fixed)
Compulsory fields in Advanced Ticket Query
|Reported by:||Owned by:||Christopher Lenz|
It seems that the query form at View Tickets → Custom Query → Advanced Ticket Query expects that the "Assigned to:" and "Reported by:" fields should be filled in. While this is possible, this is not the general case - it is much more probable that these two fields would be unknown.
If this should be fixed - can you outline how to upgrade an existing installation?
Change History (9)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
comment:3 by , 19 years ago
comment:4 by , 19 years ago
We did a deploy at our firm and we entered some tickets. Then we tried searching the ticket database via View Tickets → Custom Query → Advanced Ticket Query. Regardless of what is selected and how many are the selections in the select boxes, we only get results if and only if there is something entered in both the "Assigned to:" and "Reported by:" fields. All the bugs have been reported and assigned to people with accounts. Maybe the form is searching for unassigned or unreported tickets (those with no value for those fields). Shouldn't the behaviour be that an input with nothing in it means "any value for" and not "no value for"? At least that would have been my natural feeling. The fields are not compulsory in the sense that the submit will proceed and return:
Advanced Ticket Query No tickets matched this query.
even if nothing is entered in them but in order to get any meaningful results (i.e. a non empty set) one has to enter some information (and valid one) in both the "Assigned to:" and "Reported by:" fields.
comment:5 by , 19 years ago
|Status:||new → assigned|
This works for me.
I'll add debug logging for the SQL generated by the query module, so if you can upgrade to the latest rev (after I've added the logging, of course) and post what's getting logged, that would help a lot.
comment:6 by , 19 years ago
comment:7 by , 19 years ago
i tried to execute Custom Query from Changeset 
i'm personaly think needs alot of patience to create a report that work. Maybe is a good idea not incorporate fields that has no input.
My Output was the following:
SELECT ticket.id AS id, ticket.summary AS summary, ticket.status AS status, ticket.component AS component, ticket.owner AS owner, ticket.priority AS priority, ticket_custom.name AS name, ticket_custom.value AS value FROM ticket OUTER JOIN ticket_custom ON id = ticket INNER JOIN ( SELECT name AS priority_name, value AS priority_value FROM enum WHERE type = 'priority' ) AS p ON priority_name = priority WHERE ( name='timefortask' AND ( value = '' ) ) AND reporter = '' AND cc LIKE '%%' AND owner = '' AND ( name='deadline' AND ( value = '' ) ) AND keywords LIKE '%%' AND resolution = 'fixed' ORDER BY priority_value DESC
comment:8 by , 19 years ago
|Status:||assigned → closed|
comment:9 by , 19 years ago
After testing - I confirm the bug is fixed.
Yes - it was appearing via the cgi-bin interface.
You are fast.
No field on the advanced query screen is required, so I don't quite understand the problem. Can you provide more info?