Merge lp://staging/~chad.smith/lp2kanban/branch-to-card into lp://staging/lp2kanban

Proposed by Chad Smith
Status: Merged
Merged at revision: 120
Proposed branch: lp://staging/~chad.smith/lp2kanban/branch-to-card
Merge into: lp://staging/lp2kanban
Diff against target: 554 lines (+213/-46)
4 files modified
src/lp2kanban/bugs2cards.py (+70/-13)
src/lp2kanban/kanban.py (+79/-16)
src/lp2kanban/tests/common.py (+5/-2)
src/lp2kanban/tests/test_bugs2cards.py (+59/-15)
To merge this branch: bzr merge lp://staging/~chad.smith/lp2kanban/branch-to-card
Reviewer Review Type Date Requested Status
Данило Шеган (community) Approve
Landscape Pending
Review via email: mp+280729@code.staging.launchpad.net

Description of the change

Add initial support for branch cards and taskboards. This branch only handles syncing and moving branch "MP/blue" cards on the Landscape 2016 board.

 Support was added for branch cards inside bugs2card because a lot of the logic is common and can hopefully be consolidated in a subsequent branch.

There will be a followup branch with added logic in bugs2cards to call moveToTaskBoard for feature cards that are manually dragged to the "$Group::Landed" lane.

src/lp2kanban/kanban.py:
- Define initial LeankitTaskBoard class
- Add optional CurrentTaskBoardId property to LeankitCard
- Add LeankitCard.moveToTaskBoard method to move a card as a subtask of another card
- Since Taskboard API calls live on a different route, rework API routes defined on the LeankitConnector class

src/lp2kanban/bugs2cards.py:
- _get_mp_info to handle non-bug branch records when parsing linked MPs
- should_sync_card to return true if external_system_url is a branch
- get_card_status returns proper status for cards that have external_system_urls linked but no bugs (external_system_id) linked
- add a loop to sync_board function which processes all "branch cards" through board.getCardsWithExternalLinks(only_branches=True)

config/sync.ini:
  - comment out [Landscape Cisco] board definition (as that should live in this board now

To test:
buildout
./bin/test
# to test against the new landscape 2016 board
./create_creds.py (this will create your creds to modify the shared 2016 board)
Select "Change anything" button in your browser to allow updating cards
make config
./bin/py src/lp2kanban/bugs2cards.py -c configs/sync.ini -b 'Landscape 2016'

# Tweak branches or drag cards at https://canonical.leankit.com/Boards/View/102392996#workflow-view that you want to see automatically moved back to the proper lanes.

What's lacking:
 unit tests to cover bugs2card sync_board (coming in a followup branch)

To post a comment you must log in.
135. By Chad Smith

simplify moveToTaskBoard card method

136. By Chad Smith

merge ~landscape/lp2kanban/landscape-deploy to drop configs

Revision history for this message
Данило Шеган (danilo) wrote :

Please merge latest lp:~landscape/lp2kanban/landscape-deploy and drop configs altogether (merge them into lp:~landscape/landscape/lp2kanban-configs instead).

Looks good, only minor comments inline.

review: Approve
137. By Chad Smith

address review comments: approved branches that have not yet been merged will remain in the status LANDING. update copyright.

138. By Chad Smith

fix has_branch conditional to first check if card.external_system_url is not None before trying to match BRANCH_REGEX

139. By Chad Smith

card.save needs to be taskboard aware. When calling UpdateCard the parent_board.id needs to be specified, not the taskboard.id

140. By Chad Smith

add parent_card param to LeankitTaskBoard so that we have a refernce to the taskboard's card on the parent_board. Use the parent_card for card path printing

141. By Chad Smith

merge landscape-deploy to get latest changes to jenkins.sh

142. By Chad Smith

revert test makefile change

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: