Revert spam (or something that stinks)
[ikiwiki] / doc / todo / Updated_bug_tracking_example.mdwn
1 I've put together an updated bug tracking example.  This example requires some recent
2 patches of mine.  It requires [[todo/tracking_bugs_with_dependencies]], 
3 [[todo/Allow_edittemplate_to_set_file_type]] and the second [[patch]] in
4 [[todo/structured_page_data]] (the data plugin, not the form plugin).
5
6 You'll then want to add/replace the following files in the software project example.  The
7 heading is the name of the file.  I've commented all the directives.  Oh, and I don't
8 have nice CSS for this yet. I did make sure that if I borrowed
9 [Trac's](http://trac.edgewall.org/) css then it would display as nicely as theirs - the
10 html is there if not the CSS.
11
12 It might be worth adding some justification of what is going on here.  The datatable
13 and data directives generate a nice tabular form for the structured data.  The HTML
14 generated is the same as for Trac, except I've got fewer fields.  Adding more is trivial.
15
16 I use data directives rather than links because the data directive allows separating
17 dependencies from links.  We can specify 'bugs with all dependencies closed' without
18 being confused by other links on the page.
19
20 -- [[Will]]
21
22 ### templates/bug.mdwn
23
24     \[[!datatable class="bugtable" datalist="""
25     [[!data key="Reported by" link=""]]                                 [[!data key="Owned by" link=""]]
26     [[!data key="Depends on"]]
27     """]]
28     
29     ### Description
30     
31     This is a bug that needs solving.
32     
33     #### Steps to reproduce:
34     
35     #### What I expect to happen:
36     
37     #### What actually happens:
38     
39     #### What I have tried to narrow it down:
40     
41 ### bugs.mdwn
42
43     This is FooBar's bug list. Link bugs to \[[bugs/done]] when done.
44     
45     \[[!inline pages="bugs and ! bugs" feeds=no postform=yes 
46     postformtext="Report a bug:" rootpage="bugs"]]
47     
48     \[[!edittemplate template="templates/bug" match="bugs/* and !*/Discussion" silent=yes]]
49     
50     \[[!toggle id="all bugs" text="Show all bugs"]]
51     
52     \[[!toggle id="open bugs" text="Show open bugs"]]
53     
54     \[[!toggle id="ready bugs" text="Show ready bugs (open bugs with all dependencies closed)"]]
55     
56     \[[!toggleable id="ready bugs" text="""
57     #### Ready Bugs
58     
59     Open bugs with all dependencies closed.
60     
61     [[!inline pages="define(~open, ./bugs/* and !./bugs/done and !link(done) and !*/Discussion)
62     and ~open and !data_link(Depends on,~open)" actions=yes archive=yes show=0]]
63     """]]
64     
65     \[[!toggleable id="open bugs" text="""
66     #### Open Bugs
67     
68     [[!inline pages="./bugs/* and !./bugs/done and !link(done) 
69     and !*/Discussion" actions=yes archive=yes show=0]]
70     """]]
71     
72     \[[!toggleable id="all bugs" text="""
73     #### All Bugs
74     
75     [[!inline pages="./bugs/* and !./bugs/done and !*/Discussion"
76     actions=yes archive=yes show=0]]
77     """]]
78     
79 ### bugs/needs_more_bugs.mdwn
80
81     \[[!datatable class="bugtable" datalist="""
82     [[!data key="Reported by" link="John"]]                                     [[!data key="Owned by" link="Frank"]]
83     [[!data key="Depends on" link="bugs/fails_to_frobnicate"]]
84     """]]
85     
86     ### Description
87     
88     FooBar does not have enough bugs, which suggests that it's not a real Free
89     Software project. Please help create more bugs by adding code to FooBar!
90     :-)
91     
92     #### Steps to reproduce:
93     
94     Test frobnicate.
95     
96     #### What I expect to happen:
97     
98     It should fail.
99     
100     #### What actually happens:
101     
102     It works.
103     
104     #### What I have tried to narrow it down:
105     
106     I've added some code, but I'm not sure it was the right code.
107
108 ### bugs/fails_to_frobnicate.mdwn
109
110     \[[!datatable class="bugtable" datalist="""
111     [[!data key="Reported by" link="John"]]                                     [[!data key="Owned by" link="Frank"]]
112     [[!data key="Depends on"]]
113     """]]
114     
115     ### Description
116     
117     FooBar, when used with the `--frob` option, fails to properly frobnicate
118     output.
119     
120     > This is fixed in \[[news/version_1.0]]; marking this bug \[[done]].
121     
122     #### Steps to reproduce:
123     
124     Use FooBar with the `--frob` option.
125     
126     #### What I expect to happen:
127     
128     Lots of frobnication.
129     
130     #### What actually happens:
131     
132     Complete lack of frobnication
133     
134     #### What I have tried to narrow it down:
135     
136     Tested on Linux, MacOS and NetBSD.