Page count = 30
When I have a Project p and try to get its total tickets total = p.tickets(:q => "state:new").size
I always get 30 as result, because it is the page size in search. How can I get all tickets, ignoring paging?
Discussions are closed to public comments.
If you need help with Lighthouse please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
1 Posted by Justin Palmer on 28 Jan, 2009 06:25 PM
We don't have a way to get the count from a raw query, however you can get a count from ticket bins if you save that query as a ticket bin. Will that work for you?
See http://lighthouseapp.com/api/ticket-bins
2 Posted by Daniel Cukier on 12 Feb, 2009 12:44 PM
I resolved by paginating the search and counting the elements. Maybe there should be a configurable page size, not a fixed 30 value.
3 Posted by Rick on 14 Feb, 2009 07:17 PM
I think allowing a configurable page count (30, 50, 100?) would be good. We'd probably implement a full archive by emailing you when the complete ticket dump was built though. Building a massive archive of 1000's of tickets can take awhile (in the context of a web app) and eat up a lot of server memory.
4 Posted by Rick on 14 Feb, 2009 07:47 PM
Okay, I deployed the configurable ticket page limit. It's capped at 100. Nothing in the UI yet, but we'll probably throw in some dropdown for choices like 30/50/100. Good enough for your upgrade script though!
Rick closed this discussion on 14 Feb, 2009 07:47 PM.