Merge lp://qastaging/~gmb/lp2kanban/dont-rely-on-external_system_url into lp://qastaging/~launchpad/lp2kanban/trunk
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | 95 |
Merged at revision: | 65 |
Proposed branch: | lp://qastaging/~gmb/lp2kanban/dont-rely-on-external_system_url |
Merge into: | lp://qastaging/~launchpad/lp2kanban/trunk |
Prerequisite: | lp://qastaging/~gmb/lp2kanban/cards2workitems |
Diff against target: |
587 lines (+272/-60) 6 files modified
src/lp2kanban/bugs2cards.py (+5/-5) src/lp2kanban/cards2workitems.py (+15/-4) src/lp2kanban/kanban.py (+66/-5) src/lp2kanban/tests/common.py (+38/-6) src/lp2kanban/tests/test_bugs2cards.py (+100/-15) src/lp2kanban/tests/test_cards2workitems.py (+48/-25) |
To merge this branch: | bzr merge lp://qastaging/~gmb/lp2kanban/dont-rely-on-external_system_url |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email:
|
Commit message
Stop relying on external_system_url for blueprint links since they can be overwritten merge proposals, etc.
Description of the change
(copied from parent branch):
So, because I'm a bit touched in the brainpan, I decided to have a crack at storing metadata in the description field. Revisions 81-90 of this branch represent that work.
I've had to make some modifications to the test stubs to make everything work nicely. The new functionality is as follows:
- Metadata can be stored in the card description as key=value pairs. Anything that's not key=value is ignored.
- Metadata can be retrieved via card.descriptio
- card.descriptio
- Individual annotation C,U and D come in the form of .writeAnnotation() and .removeAnnotati
- The cards2workitems code still allows you to use the external_system_url field to put a blueprint in, but if it encounters this it will also store the blueprint url in the description annotations for safekeeping (users shouldn't have to edit annotations directly, but they can if they so wish).
This branch is eminently landable as-is. I had a couple of
questions/thoughts while reading it.
I'm not quite clear on why the annotations aren't just a read/write
record or dictionary-like object. The "this protects devs from data
loss" bit confuses me.
I'm torn between the current implementation for storing the values and a
JSON-based format.
The current approach is nice to look at and edit. The benefit of JSON
would be that it is richer (arrays, objects, embedded newlines, etc.).
If we decided to go with JSON my first suggestion would be to divide the
description into "text before the first {", "text after the last }", and
"text between the first { and last } (including the braces themselves".
That approach would make it easy to preserve the text around the JSON
and using Python's "json" module would make the (un)serializing easy.
The tests look really good.