On October 13, Trello added support for deleting comments. There is now a "Delete" link under comments that you made. On boards with public commenting enabled, board members can delete public comments.
However, this does not apply to copied cards as pointed out by Davide.
As an example of card creation, I describe a bookmarklet that I use to create Trello cards from Stack Exchange questions. (More serious applications, e.g., interfacing accounts of other users, would be a topic at Stack Overflow rather than here.)
Here is what you will need:
- Make sure you are logged in to Trello.
- Get app key by following instructions in Trello docs: it's as simple as following a link from there.
- Get a token for read/write access by following the URL below, and approving the request.
https://trello.com/1/authorize?key= put app key here &name=Your+App+Name&expiration=never&response_type=token&scope=read,write
- Visit the Trello board you want to use, and record the characters in the URL after
https://trello.com/b/
(this is called "board id" below, although technically not the same thing).
- Get ids of the lists in this board by directing your browser to
https://api.trello.com/1/boards/ put board id here /lists?key= put app key here &token= put token here
(for reading the response, it helps if you have a browser extension for formatting JSON).
After collecting the above data, put it in the following script and use any bookmarklet generator to wrap it up.
key = 'put app key here';
token = 'put write-access token here';
lists = {stackoverflow: 'put list id here', webapps: 'put list id here'};
site = location.hostname.split('.')[0];
id = lists[site];
if (id) {
opts = {name: $('#question-header a').text(), desc: location.href, idList: id, urlSource: null, due: null};
$.post('https://trello.com/1/cards/?key='+key+'&token='+token, opts, function() {alert('Card added')});
}
The script creates a card in your list for the SE site (assuming it exists), with the name being the title of the question, and the description being its URL (which becomes clickable in the Trello web interface). A confirmation message is shown.
Note: the bookmarklet uses jQuery. On Stack Exchange sites (and many others) jQuery is already loaded. If you are not sure if jQuery is available, include it with the bookmarklet (MrColes bookmarklet creator does this for you).
Best Answer
After some experimenting with Zapier, I've managed to create a "zap" (i.e. automatic handler) that does the following:
Suppose you're working on a feature which has the following Trello card: https://trello.com/c/NuSGfssX/
You push a commit to Bitbucket, which commit message contains
tr(NuSGfssX)
, e.g.:A new Trello card comment is automatically created, containing information about the commit.
Here is how it's done with Zapier:
Create a new zap with services BitBucket (New Changeset) and Trello (Create Comment).
Link your Bitbucket and Trello accounts to Zapier. I used my existing Bitbucket account, though Zapier recommends creating a separate account (which will decrease your free Bitbucket plan:). I also had problems with linking my Trello account, please ask in comments if you had them too.
Select your Bitbucket repository owner and name.
Select your Trello board and List. Both are optional: you may know only the card ID and do not care about where it is. The Card ID is permanent.
In the "Card" field, select "Advanced: type in a custom value". Type
{{message_tr}}
. Thetr
is the your (any) chosen identifier, the same as you will use in commit messages.Setup the Comment Text. My setup is the following (contains a backlink to the bitbucket comment):
Click "Turn the Zap on". The Zap is created and starts working.