Phabricator/Trello to Phabricator


 * T36 - Migrate Trello data to Phabricator
 * T821 - Trello migration script

Notes on conversion
General discussion in https://secure.phabricator.com/T3179


 * Export board from Trello
 * You can do it manually from Trello board menu Menu > Share, Print, and Export > Export to JSON
 * 500-line export-trello.py script at P1407, but that says "This script uses a trello enterprise export"

Both produce JSON


 * Import to Phabricator
 * choice A) Use PHP
 * The same cburroughs did:
 * P1403 to import-attachments.php
 * P1404 import-users.php (not relevant, we just need a mapping, but won't hurt if users have same e-mail in Phabricator as they did in Trello?)
 * P1405 to import-tickets.php (nothing specifically for Trello...)


 * Choice B) HTTP requests
 * basic createtask form at https://phab-01.wmflabs.org/conduit/method/maniphest.createtask/
 * is it a problem the creator will be the person doing the import?
 * have to find other APIs to add comments, attachments


 * Choice C) bugzilla code
 * https://github.com/wikimedia/phabricator-tools/blob/master/README, https://github.com/wikimedia/phabricator-tools/blob/master/bugzilla_create.py
 * Python API requests

What projects?
Assign to Flow and to Core-features team?

Export
Trello Export JSON as above, File > Save as myboard.json

It's a single line of JSON, so it helps a lot to format it.

The export JSON is probably too big to copy and paste into http://jsonlint.com, so instead use

still converts stuff to Unicode escapes, e.g. "name": "Flow — backlog" to  "name": "Flow \u2014 backlog"

Tip: Use  to explore the JSON.

Conduit (choice B)
The /conduit/method/maniphest.createtask conduit creates a task.

All fields are JSON, thus strings in double quotes and if field is plural, inside  array.
 * copy-paste title of card into Title field inside
 * edit description, copy-paste markup, paste into Description field inside
 * projectPHIds is , more if you want in multiple projects (see ).
 * Priority is 50 for Normal (from create task)
 * not sure about ownerPHID, editPolicy, etc.

No idea how to assign column in workboard in this.

For some automation, SPage (WMF) (talk) made an export script trello_create.py in the  branch of phabricator/tools that provides the title and description ready to copy-paste into this Conduit form. It appends a link to the Trello card to the description, see sample.


 * For more automation, script could print out curl command lines to create cards
 * or directly login to phabricator and issue conduit HTTP requests within the script

Steps

 * 1) In Trello export board as JSON
 * 2) For sanity, make it nicer-formatted. /path/to/flow-current-iteration_lOh4XCy7_fm.json
 * 3) Run python trello_create.py --json=/path/to/flow-current-iteration_lOh4XCy7_fm.json  > /path/to/conduit_fields.txt

Getting projectPHIDs
Instructions to get PHIDs for Conduit

projectPHIDs for Core-Features on is

On phab-01.wmflabs.org, "Flow (test)" is

User PHIDs?
Didn't do this, but could:

Could copy and paste Core-Features members into  to get "phid"    : "PHID-USER-37czexl6ekrvcmp2tyqq", "userName" : "DannyH"

create a mapping of Trello

Tricky bits

 * Checkboxes. I don't see special support for them in cburroughs import-tickets.php
 * Attachments.

Markup
Trello's markdown is different from Phabricator's markup
 * Italics in Trello are, in Phabricator
 * A link in Trello is, in Phabricator it is

Handling the Flow backlog board
We definitely want to migrate Next sprint/story column. Some go straight into Sprint M column, others go into backlog.

Danny created a Send to Phabricator - Collaboration-Team board.
 * 1) Migrate these, add mediawiki-extensions-Flow project as well
 * 2) Priority Low

On 2014-12-03 we archived several columns in Trello Flow backlog board. Note that if you visit a card in one of these columns, there's no indication that the card is archived (a bug in Trello).
 * Bugs to prioritize -- these were all just copy and paste from BZ, which are now cards
 * QA -- Sellello generated these
 * Mobile - TODO list from Jon Robson
 * Testing - another TODO list from Jon Robson


 * Bugs that should be turned into stories - these are in Trello, only 2
 * Needs Design/UX - mostly outdated, but some seem worthwhile
 * Story grooming meeting - Danny has to review
 * Needs acceptance criteria/story grooming - same, Danny has to review

Ideally the conversion script could evaluate Trello cards for significant comments, checklists, or attachments.