1 [[meta title="Including more bugs in your tarball: Integrated issue tracking with Ikiwiki"]]
4 [[template id=note text="""
5 [First published](http://www.linuxworld.com/news/2007/040607-integrated-issue-tracking-ikiwiki.html)
6 on [LinuxWorld.com](http:://www.linuxworld.com/), a
7 publication of Network World Inc., 118 Turnpike Rd., Southboro, MA 01772.
11 Wikis are not just for encyclopedias and websites anymore. The
12 [Ikiwiki](http://ikiwiki.info) engine can be used to handle issue tracking,
13 news feeds, and other needs of a software project. The wiki can become as
14 much a part of your software project as its code, with interesting results.
16 Ikiwiki is a wiki engine with a twist. It's best described by the term
17 "wiki compiler". Just as a typical software project consists of source code
18 that is stored in revision control and compiled with `make` and `gcc`, an
19 ikiwiki based wiki is stored as human editable source in a revision control
20 system, and built into HTML using ikiwiki.
22 Ikiwiki is a full-featured wiki that can be used for a variety of purposes,
23 from traditional wikis to weblogs, podcasting, or even aggregating together
24 other RSS feeds into a Planet. While ikiwiki is being used for purposes
25 ranging from genealogy research to shoe accessory sales, one thing it's
26 especially well suited for is collaborative software development, including
27 issue tracking, announcements, documentation, and managing a software
30 ## Building wikis with ikiwiki
32 The simplest way to use ikiwiki is to build static html files from source
33 wiki files. This example builds a wiki for an imaginary software project.
34 The wiki source files used in this example are available in the
35 `examples/softwaresite` subdirectory of ikiwiki's documentation.
38 Makefile bugs.mdwn doc/ download.mdwn news/
39 bugs/ contact.mdwn doc.mdwn index.mdwn news.mdwn
41 ikiwiki `pwd` html --wikiname FooBar --plugin=goodstuff \
42 --exclude=html --exclude=Makefile
43 wiki$ w3m -dump html/doc/faq.html
46 FooBar frequently asked questions.
48 1. Is this a real program?
51 _Is this a real program?_
53 No, it's just an example.
60 Last edited Wed Nov 22 09:58:35 2006
62 If all you need is a simple static set of pages, that can be put up on a
63 web site, or shipped with a software package, this is a good starting
64 point, which includes example pages for a news feed for the project (with
65 RSS), an issue tracker, and other pages users expect to see on a project's
66 website. The wiki's source code can be checked into revision control as part
67 of the software project, and tied into its build system using the Makefile.
69 Ikiwiki can also be tied into the `post-commit` hook of your revision
70 control system, so that whenever a developer commits a change to a wiki
71 page in revision control, the project's web site is automatically updated.
72 Ikiwiki has a [tutorial](http://ikiwiki.info/setup.html) that explains in
73 detail how to set this up using the Subversion, Git, TLA, and Mercurial
74 revision control systems.
76 The tutorial also explains how to configure ikiwiki so that users can edit
77 pages using a web interface, with their changes committed back into revision
78 control. After all one of the benefits of keeping a project's docs in a wiki
79 is to make it easy for users to improve them, so that busy software developers
80 don't have to. And if the wiki is being used for issue tracking, this will
81 let users post and follow up on bug reports.
83 ## Using a wiki for issue tracking?
85 You might be wondering exactly how a wiki can be used as an issue tracking
86 system. Three key parts of ikiwiki come together to create an issue tracker:
87 pages, tags, and inlining.
89 Each issue is described on a separate page in the wiki. There can also be
90 an associated Discussion page, as well as other related subpages that can
91 be used to hold files used to reproduce the bug, or patches, or other
92 related files. Since each issue is a page, standard wiki links can be used
93 to link related issues, or link issues with other pages in the wiki, and
94 each issue has its own unique URL. Since ikiwiki supports subdirectories,
95 it's usual to keep all the bugs in a `bugs/` subdirectory. You might prefer
96 to separate bugs and todo items, with todo items in their own 'todo/'
99 While directories are useful for broad hierarchical grouping, tags can be
100 used to categorize issues, as bugs, wishlist items, security issues,
101 patches, or whatever other categories are useful. Bugs can be tagged
102 "moreinfo", "done" or "unreproducible", or "moreinfo", etc, to document
103 different stages of their lifecycle. Developers can take ownership of a bug
104 by tagging it with something like "owner/Joey".
106 To tag a wiki page, edit it and add text such as "\[[tag done]]". Note that
107 adding a wiki link to "\[[done]]" will have the same categorisation effect
108 as a tag, but the link will show up in the body of the page, which is a
109 nice effect if used in a sentence such as "This was \[[done]] in version
110 1.1.". Another way to close a bug is to move it out of the `bugs/`
111 subdirectory, though this would prevent it from showing up in a list of
114 Inlining is how ikiwiki pulls individual issue pages together into
115 something larger, be it a page listing recently opened bugs (with a form to
116 let a user easily post a new bug), or a page listing recently closed bugs,
117 or an index of all bugs, or all wishlist items, or RSS feeds for any of
118 these. A flexible syntax is used for specifying what kind of pages should
119 be inlined into a given page. A few examples:
121 * A typical list of all open bugs, with their full text, and a form to post new
124 \[[inline pages="bugs/* and !link(done) and !*/Discussion" actions=yes postform=yes show=0]]
126 * Index of the 30 most recently fixed bugs.
128 \[[inline pages="bugs/* and link(done) and !*/Discussion" sort=mtime show=30 archive=yes]]
130 * Index of the 10 most recently active bugs.
132 \[[inline pages="bugs/* and !link(done) and !*/Discussion" sort=mtime show=10]]
134 * Open security issues.
136 \[[inline pages="bugs/* and link(security) and !link(done) and !*/Discussion"]]
138 * Full text of bugs assigned to Joey.
140 \[[inline pages="bugs/* and link(owner/Joey) and !link(done) and !*/Discussion" show=0]]
142 It may seem strange to consider using a wiki for issue tracking when there
143 are several dedicated bug tracking systems, like Bugzilla, that handle all
144 aspects of it already. The weakest part of using ikiwiki for issue
145 tracking, and certainly the place where a dedicated bug tracker like
146 Bugzilla shines in comparison, is storing and querying structured data
147 about bugs. Ikiwiki has little structured data except for page filenames
148 and tags, so if you need lots of queryable data such as what versions a bug
149 affects and what version it was fixed in, ikiwiki may not be a good fit for
152 On the other hand, by using a wiki for issue tracking, there is one less
153 system for users and developers to learn, and all the flexibility of a wiki
154 to take advantage of. Ikiwiki even supports OpenID, so it's easy for users
155 to use it for filing bugs, without going through an annoying registration
160 Realistically, there are plusses and minuses to letting users edit a
161 software project's documentation in a wiki. Like any wiki, to be
162 successful, some review is needed of the changes users make. In some cases
163 it will be easiest to limit the pages that users are allowed to edit.
164 Still, keeping the wiki open for user edits will probably turn up some
165 passionate users who prove very useful at filling in holes in the
166 documentation and cleaning up the site.
168 Programmers are supposed to be bad at writing documentation, and putting a
169 project's docs into a wiki might not solve that. But it can make it a
170 little bit easier. Consider a programmer who's just coded up a new feature.
171 He can commit that to a development branch in revision control, and then go
172 update the docs on the web site to document it. But the feature isn't
173 available in a released version yet, so it's probably easier to skip
174 updating the website. Maybe once it's released, the web site will be
175 updated to mention the feature, but maybe (probably) not.
177 Now consider what happens if instead the web site is a wiki, that has its
178 source included in the project's revision control system. The programmer
179 codes up the feature, and can easily update the docs in the wiki to match.
180 When he commits his changes to a development branch, the docs are committed
181 too. Later, when that change is merged to the release branch, the doc
182 changes are also merged, and automatically go live on the web site.
183 Updating the documentation to reflect each change made and publishing it on
184 the website has become a standard part of the programmer's workflow.
186 But this still requires programmers to write documentation, so maybe it
187 still won't work. Let's go back a step. Before the programmer wrote that
188 feature, he probably got some requests for it, and maybe he developed those
189 into a specification for how the feature should work. Since ikiwiki can be
190 used as an issue tracker, the requests were made using it, and were
191 collaboratively edited on the wiki, to develop the specification. Once the
192 feature is implemented, that issue can be closed. What better way to close
193 it than to move it out of the issue tracking system, and into the project's
196 svn mv wiki/bugs/new_feature.mdwn wiki/doc/
198 If the spec is written well enough to be useful for end user documentation,
199 the programmer doesn't have to write a lot of docs after all; that was done
200 when the feature was designed. By using ikiwiki for issue tracking, plus
201 editing the spec, plus documentation, plus the website, each of these steps
202 has built on the other and the programmer has had to do less busywork.
204 A different example of how ikiwiki can tie things together is how a
205 security hole might be handled. First it's discovered, and a bug filed
206 about it. When it's fixed, the commit that fixes the bug can include a
207 change to the bug's page, marking it as done. Since it's a security hole,
208 an announcement needs to be made right away so users will know they need to
209 upgrade. This announcement can be added to the wiki's news feed, and
210 committed along with the fix, and the announcement can use a regular wiki
211 link to link to the bug that describes the security hole in detail. If the
212 security hole also affects an older version of the software, the fix, along
213 with the wiki documentation for that fix, can be merged into the branch for
216 Another benefit of keeping the bug tracking system in revision control with
217 the wiki is that it allows for disconnected development. So there's no need
218 to be online to review the project's bug list, and there's no need to
219 remember to close fixed bugs once you're back online.
221 For fans of distributed revision control, ikiwiki opens even more
222 possibilities. With a project's website and issue tracker kept in
223 distributed revision control with the project, these become distributed as
224 well, rather than centralized appendixes to the project. Developers can
225 pass around changesets that not only fix bugs, but mark them as done. If
226 large changes are being made in someone's branch, they can choose to put up
227 their own version of the website, use it to track bugs for that branch, and
228 when the branch is ready, all these changes can be merged back into the
229 mainline of the project.