Merge lp:~jkakar/kanban/include-needs-testing-bugfixes into lp:kanban

Proposed by Jamu Kakar
Status: Merged
Approved by: Martin Pool
Approved revision: 29
Merged at revision: 28
Proposed branch: lp:~jkakar/kanban/include-needs-testing-bugfixes
Merge into: lp:kanban
Diff against target: 98 lines (+32/-12)
4 files modified
kanban/board.py (+5/-3)
kanban/templates/kanban.html (+11/-8)
kanban/tests/test_board.py (+15/-0)
media/kanban.css (+1/-1)
To merge this branch: bzr merge lp:~jkakar/kanban/include-needs-testing-bugfixes
Reviewer Review Type Date Requested Status
Martin Pool Approve
Review via email: mp+56035@code.launchpad.net

Description of the change

This branch introduces the following changes:

- Malformed content in the HTML template has been fixed.

- The 'include_needs_testing' state is passed to Story classes, which
  fixes problems with rendering cards in the wrong column when 'Needs
  testing' is enabled.

To post a comment you must log in.
29. By Jamu Kakar

- The 'Ubuntu' font is the default and 'UbuntuBeta' has been removed.

Revision history for this message
Martin Pool (mbp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'kanban/board.py'
--- kanban/board.py 2011-03-29 13:59:45 +0000
+++ kanban/board.py 2011-04-02 09:38:29 +0000
@@ -133,7 +133,7 @@
133 to use the 'Needs testing' category. Defaults to C{False}.133 to use the 'Needs testing' category. Defaults to C{False}.
134 """134 """
135135
136 def __init__(self, name, include_needs_testing=False):136 def __init__(self, name, include_needs_testing=None):
137 self.name = name137 self.name = name
138 self.include_needs_testing = include_needs_testing138 self.include_needs_testing = include_needs_testing
139 self.bugs = []139 self.bugs = []
@@ -208,12 +208,14 @@
208 if story:208 if story:
209 stories.append(story)209 stories.append(story)
210 else:210 else:
211 story = Story(name)211 story = Story(
212 name, include_needs_testing=self.include_needs_testing)
212 self._stories[name] = story213 self._stories[name] = story
213 stories.append(story)214 stories.append(story)
214 else:215 else:
215 if None not in self._stories:216 if None not in self._stories:
216 self._stories[None] = Story(None)217 self._stories[None] = Story(
218 None, include_needs_testing=self.include_needs_testing)
217 stories.append(self._stories[None])219 stories.append(self._stories[None])
218220
219 return stories221 return stories
220222
=== modified file 'kanban/templates/kanban.html'
--- kanban/templates/kanban.html 2011-03-15 07:37:00 +0000
+++ kanban/templates/kanban.html 2011-04-02 09:38:29 +0000
@@ -47,15 +47,18 @@
4747
48 {% for story in kanban_board.stories %}48 {% for story in kanban_board.stories %}
49 {% if kanban_board.stories|length > 1 %}49 {% if kanban_board.stories|length > 1 %}
50 <div class="tiles row story">50 {% if story.name %}
51 {% if story.name %}51 <div class="tiles row story">
52 <div class="position-0 {{ board_width_class }} cell">{{ story.name }}</div>52 <div class="position-0 {{ board_width_class }} cell">{{ story.name }}</div>
53 {% else %}53 </div>
54 <div class="position-0 {{ board_width_class }} cell">uncategorized</div>54 {% else %}
55 {% endif %}55 <div class="tiles row story">
56 {% else %}56 <div class="position-0 {{ board_width_class }} cell">uncategorized</div>
57 </div>
58 {% endif %}
59 {% else %}
57 <div class="tiles row no-story"></div>60 <div class="tiles row no-story"></div>
58 {% endif %}61 {% endif %}
5962
60 <div class="tiles row">63 <div class="tiles row">
61 <div class="position-0 width-2 cell">64 <div class="position-0 width-2 cell">
6265
=== modified file 'kanban/tests/test_board.py'
--- kanban/tests/test_board.py 2011-03-29 13:59:45 +0000
+++ kanban/tests/test_board.py 2011-04-02 09:38:29 +0000
@@ -480,6 +480,21 @@
480 self.assertEqual(["story-test1", "story-test2", None],480 self.assertEqual(["story-test1", "story-test2", None],
481 [story.name for story in kanban_board.stories])481 [story.name for story in kanban_board.stories])
482482
483 def test_add_considers_include_needs_testing(self):
484 """
485 If a L{Bug} with a C{story-<name>} tag is added to a
486 L{StoryCollectionMixin} which is configured to include the 'Needs
487 testing' category, the related L{Story}s will also be configured to
488 include the 'Needs testing' category.
489 """
490 bug = Bug("1", "kanban", MEDIUM, NEW, "A title", tags=["story-test"])
491 kanban_board = self.create_test_class(include_needs_testing=True)
492 kanban_board.add(bug)
493 self.assertEqual([bug], kanban_board.bugs)
494 self.assertEqual(1, len(kanban_board.stories))
495 story = kanban_board.stories[0]
496 self.assertTrue(story.include_needs_testing)
497
483498
484class MilestoneBoardTest(BugCollectionMixinTestBase,499class MilestoneBoardTest(BugCollectionMixinTestBase,
485 StoryCollectionMixinTestBase, TestCase):500 StoryCollectionMixinTestBase, TestCase):
486501
=== modified file 'media/kanban.css'
--- media/kanban.css 2011-03-12 22:07:32 +0000
+++ media/kanban.css 2011-04-02 09:38:29 +0000
@@ -1,7 +1,7 @@
1body {1body {
2 background: url(background.png) repeat;2 background: url(background.png) repeat;
3 color: #222222;3 color: #222222;
4 font-family: "UbuntuBeta", Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif;4 font-family: Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif;
5 font-size: 12px;5 font-size: 12px;
6}6}
77

Subscribers

People subscribed via source and target branches

to all changes: