How do I update tickets with keywords?
There are a few spots in Lighthouse that you can use keywords to modify tickets. These keywords follow the same syntax as the search keywords:
key:value. Do not put a space after the colon.
tagged - this lets you modify the tags on a ticket.
tagged:foo- add the "foo" tag.
tagged:foo tagged:bar- add both the "foo" and "bar" tags
not-tagged:foo- remove the "foo" tag from the ticket.
responsible - this modifies the user that is responsible for the ticket.
responsible:"Ricky Bobby"- Assigns the ticket to "Ricky Bobby", use quotes around a first and last name
responsible:rick- no need for quotes
responsible:none- Clears the ticket assignment
milestone - this modifies the milestone that the ticket is currently in.
milestone:"1.0 Launch"- Moves the ticket to the "1.0 Launch" milestone
milestone:next- Moves the ticket to the current milestone.
milestone:none- Removes the ticket from all milestones.
state - Sets the ticket state. Valid values are: new, open, hold, resolved, and invalid, but can be customized per project.
priority- Sets the ticket's priority. It should be an integer greater than 0.
project - Moves the ticket to the given project. This is only valid in ticket bulk edit operations. It is ignored if no project in current account is matched. This will likely assign your ticket a new number inside the project, so be prepared for it to change. Also, any ticket watchers that aren't in the new project will be removed. Milestones will be cleared if one is not set by the command.
project:foo- Moves the ticket to the foo project.
account - Moves the ticket to the given account. A project modifier is also required. This is ignored if the account or project is invalid, or if the user does not have access to the given account.
account:foo project:bar- Moves the ticket to the bar project in the foo account.
These keywords can be present in commit messages from your source control tool (such as svn or git). You'll have to add the ticket number to the commit message so Lighthouse knows which tickets you want to update:
svn commit -m "fixed the bug [#15 state:committed]"
You can also modify multiple tickets from a single commit:
git commit -m "fixed the bug [#15 #16 state:committed]" git commit -m "fixed the bug [#15 state:committed] [#16 state:committed milestone:next]"
You can use keywords in the email body to modify tickets. No ticket number needs to be referenced:
Just confirmed that Ricky Bobby's branch fixed the bug. [state:reviewed not-tagged:urgent] // Add your reply above here ================================================== Ricky Bobby updated this ticket at March 25th, 2009 @ 03:45 PM
Bulk Edit Operations (experimental)
Bulk edit operations allow you to modify a bulk of tickets at once from a single command. They are currently implemented only in the API while we investigate and build tools to take advantage of the feature. This is currently the only way you can move tickets across accounts and projects.
You'll have to send an HTTP POST request to
/projects/:project_id/bulk_edit.json. Here's an example using the curl command line tool:
curl -X POST "http://YOURACCOUNT.lighthouseapp.com/projects/YOURPROJECT/bulk_edit.json?_token=YOURTOKEN&query=state:open:&command=state:resolved"
If you break that example down, you'll see two required parameters (and the _token parameter that is used for authentication):
query - this any search query that is valid on the tickets page. You can also reference all tickets with
allor a single ticket with just the ticket's number.
command - This is a string of commands using the keywords from above.
migration_token - This needs to be a token of a user that has access to the project that a ticket is migrating to. If the
accountkeywords are not used, this is ignored. Otherwise, you need this.
If successful, this will return a blank HTTP 200 response. You may have to wait a few moments while the background queue runs the bulk edit task, depending on how intensive the command is. Once finished, you will see an entry in the activity feed for the project.
This is still an experimental feature. Please give feedback if you see undesirable side effects. All operations are logged, so it is possible for us to undo problematic operations if needed.
Here is a ruby script for issuing update commands from the command line.