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
1=== modified file 'kanban/board.py'
2--- kanban/board.py 2011-03-29 13:59:45 +0000
3+++ kanban/board.py 2011-04-02 09:38:29 +0000
4@@ -133,7 +133,7 @@
5 to use the 'Needs testing' category. Defaults to C{False}.
6 """
7
8- def __init__(self, name, include_needs_testing=False):
9+ def __init__(self, name, include_needs_testing=None):
10 self.name = name
11 self.include_needs_testing = include_needs_testing
12 self.bugs = []
13@@ -208,12 +208,14 @@
14 if story:
15 stories.append(story)
16 else:
17- story = Story(name)
18+ story = Story(
19+ name, include_needs_testing=self.include_needs_testing)
20 self._stories[name] = story
21 stories.append(story)
22 else:
23 if None not in self._stories:
24- self._stories[None] = Story(None)
25+ self._stories[None] = Story(
26+ None, include_needs_testing=self.include_needs_testing)
27 stories.append(self._stories[None])
28
29 return stories
30
31=== modified file 'kanban/templates/kanban.html'
32--- kanban/templates/kanban.html 2011-03-15 07:37:00 +0000
33+++ kanban/templates/kanban.html 2011-04-02 09:38:29 +0000
34@@ -47,15 +47,18 @@
35
36 {% for story in kanban_board.stories %}
37 {% if kanban_board.stories|length > 1 %}
38- <div class="tiles row story">
39- {% if story.name %}
40- <div class="position-0 {{ board_width_class }} cell">{{ story.name }}</div>
41- {% else %}
42- <div class="position-0 {{ board_width_class }} cell">uncategorized</div>
43- {% endif %}
44- {% else %}
45+ {% if story.name %}
46+ <div class="tiles row story">
47+ <div class="position-0 {{ board_width_class }} cell">{{ story.name }}</div>
48+ </div>
49+ {% else %}
50+ <div class="tiles row story">
51+ <div class="position-0 {{ board_width_class }} cell">uncategorized</div>
52+ </div>
53+ {% endif %}
54+ {% else %}
55 <div class="tiles row no-story"></div>
56- {% endif %}
57+ {% endif %}
58
59 <div class="tiles row">
60 <div class="position-0 width-2 cell">
61
62=== modified file 'kanban/tests/test_board.py'
63--- kanban/tests/test_board.py 2011-03-29 13:59:45 +0000
64+++ kanban/tests/test_board.py 2011-04-02 09:38:29 +0000
65@@ -480,6 +480,21 @@
66 self.assertEqual(["story-test1", "story-test2", None],
67 [story.name for story in kanban_board.stories])
68
69+ def test_add_considers_include_needs_testing(self):
70+ """
71+ If a L{Bug} with a C{story-<name>} tag is added to a
72+ L{StoryCollectionMixin} which is configured to include the 'Needs
73+ testing' category, the related L{Story}s will also be configured to
74+ include the 'Needs testing' category.
75+ """
76+ bug = Bug("1", "kanban", MEDIUM, NEW, "A title", tags=["story-test"])
77+ kanban_board = self.create_test_class(include_needs_testing=True)
78+ kanban_board.add(bug)
79+ self.assertEqual([bug], kanban_board.bugs)
80+ self.assertEqual(1, len(kanban_board.stories))
81+ story = kanban_board.stories[0]
82+ self.assertTrue(story.include_needs_testing)
83+
84
85 class MilestoneBoardTest(BugCollectionMixinTestBase,
86 StoryCollectionMixinTestBase, TestCase):
87
88=== modified file 'media/kanban.css'
89--- media/kanban.css 2011-03-12 22:07:32 +0000
90+++ media/kanban.css 2011-04-02 09:38:29 +0000
91@@ -1,7 +1,7 @@
92 body {
93 background: url(background.png) repeat;
94 color: #222222;
95- font-family: "UbuntuBeta", Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif;
96+ font-family: Ubuntu, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, sans-serif;
97 font-size: 12px;
98 }
99

Subscribers

People subscribed via source and target branches

to all changes: