Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8939 closed defect (fixed)

TicketQuery macro with group parameter occurs an error

Reported by: Jun Omae <jun66j5@…> Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: ticket system Version: 0.12dev
Severity: normal Keywords: patch
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

TicketQuery macro with group parameter in trac-0.12 r9004 occurs an error.

Error: Macro TicketQuery(milestone=0.12,group=owner) failed

list indices must be integers

The problem is fixed by this ad-hoc patch in my environment….

  • trac/ticket/query.py

     
    13001300                          "%(query)s", groupvalue=v, groupname=query.group,
    13011301                          query=q.to_string())
    13021302                # produce the href for the query corresponding to the group
    1303                 q.constraints[str(query.group)] = v
     1303                q.constraints[0][str(query.group)] = v
    13041304                q.order = order
    13051305                href = q.get_href(formatter.context)
    13061306                groups.append((v, [t for t in g], href, title))

Attachments (0)

Change History (2)

comment:1 by Remy Blank, 15 years ago

Owner: set to Remy Blank

It looks like we missed something while implementing the OR clauses. Thanks for the patch!

comment:2 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in [9031], but also take OR clauses into account, so I set the group constraint on all clauses.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank 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.