project.tickets.size < project.open_tickets
Hello, I am trying to grab the total number of tickets so I can properly paginate the results, however I am getting confusing and seemingly inconsistent results. For example:
pro=Lighthouse::Project.find( my_project_id ) pro.open_tickets_count => 10 pro.tickets.size => 4
I read thru the docs trying to understand this but am not understanding why the different counts. Especially since in the test project I am testing against I have 7 open_tickets for the first milestone, 2 for the next, and one unassigned to a milestone. and no closed tickets. So where is the 4 coming from?
Also, I would really like a way to determine how many total tickets there are, including closed. Is there a way to do this?
Any help is appreciated. Thanks, Michael Fairchild
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 mfairchi on 19 Oct, 2008 05:20 AM
let me try to format that better:
pro=Lighthouse::Project.find( my_project_id )
pro.open_tickets_count # = 10
pro.tickets.size # = 4
2 Posted by Rick on 19 Oct, 2008 11:23 PM
Project#open_tickets_count
is a count of all the open tickets in the project.Project#tickets
, however, uses your default ticket bin to list the tickets. It's just an xml version of the web tickets listing. The default ticket bin isresponsible:me state:open
by default, but you can change this to whatever you want. If you create a new ticket bin forstate:open
and set that as your default,pro.tickets.size
should equalopen_tickets_count
.