Opened 6 years ago

Closed 6 years ago

#3509 closed defect (wontfix)

query more than 100 tickets?

Reported by: mansukim@… Owned by: athomas
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: stp Trac Release: 0.11

Description (last modified by stp)

When I query below, it only returns 100 ticket numbers, but trac has almost 3000 tickets.

import xmlrpclib

server = xmlrpclib.ServerProxy("")
for ticket in server.ticket.query():
        print ticket

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by athomas

  • Resolution set to invalid
  • Status changed from new to closed

The default is to return only tickets that are not closed. The function takes a query string in the same format as Trac's /query handler. See that for more details.

comment:2 Changed 6 years ago by anonymous

  • Resolution invalid deleted
  • Status changed from closed to reopened

I think this could actually still be a bug. When I create a query in Mylyn over all my tickets, open or closed (according to the identical Trac custom query, it should be 865 tickets), Mylyn only fetches exactly the first 100 of the query and thinks it's done.

This means I have to do a bunch of small queries, which the Mylyn documentation specifically counsels not to do.

comment:3 Changed 6 years ago by anonymous

Trac queries by default return 100 results. You can change the number by appending "max=number" to your query. Did the trick for me.

comment:4 Changed 6 years ago by anonymous

You can also change the default value in trac.ini: ... [query] items_per_page=XXXX

(I also use Mylyn and that fixed the task list for me.)

comment:5 Changed 6 years ago by stp

  • Cc stp added; anonymous removed
  • Description modified (diff)
  • Resolution set to wontfix
  • Status changed from reopened to closed
  • Summary changed from qury more than 100 tickets? to query more than 100 tickets?

Marking as wontfix since the API works as intended.

Please refer to this bug for addressing the limitation in Mylyn:

268427: query only returns first 100 matches

Add Comment

Modify Ticket

as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.