Tags via API

catwood's Avatar


09 Jul, 2007 09:54 PM

I'd love to be able to get to a tickets tags with something like:

ticket.tags.include? "fixed"

Instead, I'm doing this:

tickets = project.tickets(:q => "status:open #{self.part_number}")
fixed = project.tickets(:q => "status:open #{self.part_number} tagged:fixed").collect{|t| t.number }
tickets.each do |ticket|
  if fixed.include? ticket.number
     ticket.fixed = true
     ticket.fixed = false

It's ugly, require two calls over the wire to the API - but right now it seems to be the only way to see what tags are on a ticket. Am I missing something? Is there a better way?

  1. 1 Posted by Rick on 09 Jul, 2007 10:03 PM

    Rick's Avatar

    Ouch. Tags are associated models that don't get pulled down with the rest of the ticket attributes. This will be fixed in the next major update though.

  2. 2 Posted by catwood on 09 Jul, 2007 10:16 PM

    catwood's Avatar

    Rick - Thanks for the quick reply.

    Any guess on when that update is going out?

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts


? 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