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
 * 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) curl requests
 * basic createtask 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.

Backlog export JSON is too big for jsonlint.com, use

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

Use  to investigate.

Conduit
The maniphest-create-task conduit can create a task.

All fields are JSON, thus in double quotes and if field is plural, inside [ ] array.
 * copy-paste title of card into title inside ""
 * edit description, copy-paste markup, paste into description inside ""
 * projectPHIds is ["PHID-PROJ-ID"], more if you want in multiple projects.
 * 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, I made an export script that provides the title and description ready to copy-paste.

For more automation, I should create curl lines to create cards For even more, make HTTP API requests from 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
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:

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.

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.