Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#844 closed defect (fixed)

Compulsory fields in Advanced Ticket Query

Reported by: ash@… Owned by: Christopher Lenz
Priority: low Milestone: 0.8
Component: ticket system Version: devel
Severity: minor Keywords: query
Cc: Branch:
Release Notes:
API Changes:

Description

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?

Attachments (0)

Change History (9)

comment:1 by Christopher Lenz, 15 years ago

No field on the advanced query screen is required, so I don't quite understand the problem. Can you provide more info?

comment:2 by Christopher Lenz, 15 years ago

Owner: changed from Jonas Borgström to Christopher Lenz

comment:3 by Christopher Lenz, 15 years ago

Keywords: query added

comment:4 by ash@…, 15 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 Christopher Lenz, 15 years ago

Status: newassigned

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 Christopher Lenz, 15 years ago

Logging added in [990]. Please try with debug logging enabled in TracIni and report back.

comment:7 by Ivo Looser <ivo.looser at login dot ch>, 15 years ago

i tried to execute Custom Query from Changeset [990]

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 Christopher Lenz, 15 years ago

Resolution: fixed
Status: assignedclosed

This behavior was apparently only observable with the CGI front-end. This should be fixed in [991] and [992].

comment:9 by ash@…, 15 years ago

After testing - I confirm the bug is fixed.

Yes - it was appearing via the cgi-bin interface.

You are fast.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.