Phabricator/Trello to Phabricator
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. |
SPage (WMF) (talk) has migrated tasks from various Trello boards to Phabricator projects using the trello_create.py script. As of 2015, the latest version is in the gerrit:195502 patch. phab:T821 has features implemented and wanted (many), that python comments have detailed instructions. phab:T92059 is a sample converted Trello card.
So teams initially remained on Trello, e.g. phab:T772 and phab:T832, but more due to lack of features in Phabricator at that time than unimplemented features of the migration script.
Early notes on conversion
[edit]General discussion in https://secure.phabricator.com/T3179
Export board from Trello
[edit]- You can do it manually from Trello board menu Menu > Share, Print, and Export > Export to JSON
- WMF has an enterprise account, just go to https://trello.com/wikimediafoundation/export
Both produce JSON. Both have problems :(
- The export from Trello board menu does not include all comments! For example https://trello.com/c/oJHPeRvq/9-split-topic-old-design-ideas the JSON export only has "final-comment", does not have "Issue: where does sidebar go?"!! and does not include the split_topic_normal.svg attachment on the card, perhaps because it's SVG!
- The enterprise export does not have shortUrl for each card (it's only in the actions history)
Formatting JSON
[edit]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
$ php -r 'echo json_encode( json_decode( file_get_contents( "myboard.json")), \
JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);' > myboard_fm.json
still converts stuff to Unicode escapes, e.g. "name": "Flow â backlog" to "name": "Flow \u2014 backlog"
Tip: Use jq
to explore the JSON.
Parsing Trello board JSON with cburroughs' export-trello.py
[edit]It seems the format of enterprise export change since cburroughs wrote a script? Some cards in Flow_backlog enterprise export don't have a "labels" field, and even in those that have "labels" it's an empty array. Instead, cards have "idLabels" field that references elements in the "labels" array. (Similar to "checklists"? Board export doesn't have this, just "idChecklists" in each card linking to per board "checklists" array. Enterprise export has both?)
cburroughs export_trello.py generates
"init-custom": { "std:maniphest:addthis:import-trello-column": "In Development" },
doesn't mean anything to our installation.
FIXED: The enterprise export does not identify the current column of a card It records the changes to cards including updateCard that changes the list of a card, but not where it is currently.
cburroughs export-trello does not do anything with attachments, the comment is
# [u'attachments', Never used on board
nor does it handle type=addAttachmentToCard or the "main" image for a card. Not fixed
Doesn't properly handle checklists, comment is
# u'idChecklists'] # a bunch of ids for checklists?
Fixed, checklists appear in the Description.
Ways to import to Phabricator
[edit]trello_create.py is similar to bugzilla_create.py but imports in a single step without DB manipulation.
- choice A) Use PHP
- The same cburroughs did:
- 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
- basic createtask form at https://phab-01.wmflabs.org/conduit/method/maniphest.createtask/
- 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 plus DB manipulation
- https://github.com/wikimedia/phabricator-tools/blob/master/README , https://github.com/wikimedia/phabricator-tools/blob/master/bugzilla_create.py
- Choice D) Gilles' mingleterminator import script
- gerrit:179091
- Python API requests
Notes on conduit (choice B)
[edit]The phab:/conduit/method/maniphest.createtask conduit creates a task.
An early version of the trello_create.py script provided 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. You can still generate this using the --conduit command-line argument of the latest script.
All fields in the conduit form 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
["PHID-PROJ-ID"]
, more if you want in multiple projects (see #Getting projectPHIDs). - Priority is 50 for Normal (from create task)
- not sure about ownerPHID, editPolicy, etc.
No way to assign column in workboard in this.
Getting projectPHIDs
[edit]Instructions to get PHIDs for Conduit
- projectPHIDs for "Core-Features" on phab: is
["PHID-PROJ-k73rs2d4jrtxacicze62"]
- projectPHIDs for"Flow (test)" on phab-01.wmflabs.org is
["PHID-PROJ-ofxg2d73cpefxqnworfs"]
User PHIDs?
[edit]Didn't do this, but could:
"members" : [
"PHID-USER-766idcqt4jkngnnuhnrj",
"PHID-USER-37czexl6ekrvcmp2tyqq",
"PHID-USER-c47vnc2yxmwfvvc4367q",
"PHID-USER-cgfiqjzsqzd7ulp7eyr7",
"PHID-USER-gbl4hfak3cfurt3c7skd",
"PHID-USER-hphmqcx66p6d6gvmjzp7",
"PHID-USER-dw53c5cb2qfhyemej57o",
"PHID-USER-kms5nmb5gvqzcdep3cnl",
"PHID-USER-r5pzlcquei6f4hb53rfg"
],
Could copy and paste Core-Features members into https://phabricator.wikimedia.org/tag/core-features/
to get
"phid" Â : "PHID-USER-37czexl6ekrvcmp2tyqq", "userName"Â : "DannyH"
Steps
[edit]See detailed comments in trello_create.py
Mappings
[edit]Trello | Phabricator | Trello example | Phabricator example | notes |
---|---|---|---|---|
board | projectPHID | Flow \u2014 Sprint L | PHID-PROJ-ofxg2d73cpefxqnworfs | card can only be on one Trello board. Caution, Unicode! |
Tricky bits
[edit]- Checkboxes. I don't see special support for them in cburroughs import-tickets.php
- Attachments.
Markup
[edit]Trello's markdown is different from Phabricator's markup
- Italics in Trello are
*Italic*
, in Phabricator//Italic text//
- A link in Trello is
[link text](URL)
, in Phabricator it is[[ URL | link text]]
Converted boards
[edit]Handling the Flow backlog board
[edit]In 2014 the Collaboration team migrated the Trello cards in Next sprint/story column to Phabricator using the conduit web form. Some go straight into Sprint M column, others go into backlog.
On 2014-12-03 we archived several columns in Trello Flow backlog board:
- 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
(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).)
Danny created a "Send to Phabricator - Collaboration-Team board" in the Flow backlog board, and on 2014-02-19 we finally migrated these to Phabricator using the trello_create.py script in gerrit:179057, see details in /Flow backlog import
Handling the Gather backlog board
[edit]On 2015-02-26 we migrated the Gather backlog board to Phabricator Gather project using the same script, see details in /Gather backlog import.
Handling the Growth board
[edit]On 2015-03-09 we migrated the Growth board of the disbanded Growth team to a Phabricator Growth-Team project using a newer version of the same script that lists attachments in Trello, see details in /Growth team import.
Migrating Design research
[edit]phab:T96959: On 2015-04-23 spage migrated every column of the user research Trello board except "done" to the WMF-Design-Research Phabricator project. Details in /Design research import.
Migrating Research
[edit]phab:T826: In 2015-05 spage and Grace Gellerman migrated the Research and data Trello board to the Research-and-Data Phabricator project. Details in /Research import.