Documentation

Traditionally, debbugs has divided lists of bugs by "status" (whether the bug is outstanding, forwarded, done, etc) and by "severity" (critical, grave, etc), and allowed pretty minimal manipulation of this -- basically the ability to reverse the order of various things.

Usertags enables a different approach, since sorting by "tag" suddenly becomes particularly useful and interesting.

The approach then, is to have a small evaluation language that allows you to match individual bugs to a section. A section is then defined by a sequence of expressions such as "pending=forwarded,severity=grave", and collates all the bugs that match the expression. The introduction of tags makes this slightly more complicated however, due to the fact that we might want to define one section by "tag=fixed" and another by "tag=patch", but then we need some way to tell debbugs which section should be home to a bug with both the "patch" and "fixed" tags.

The way we resolve this is by giving sections two orders: "importance" and "display". So we might want to have sections for patched bugs, pending bugs, fixed bugs, and wontfix bugs -- but we need to check for those tags in the order of "fixed,pending,wontfix,patch" -- since, eg, there's no point worrying about a "patch" tag on a bug that's not going to be fixed, nor is there any point worrying about a "wontfix" tag on a bug that has already been fixed or marked pending. The specification for this example is then:

Note that ord is 0-based, and both ttl and ord may have one more entry than pri -- this is the catchall for things that don't match any of the listed requirements. If a number is missing from ord, bugs in that category aren't displayed.

Beyond this, a hierarchy is often required -- you want to order bugs first of all by whether they're open or closed, then by how serious they are, and perhaps then by whether the bug has a patch, is confirmed, is marked wontfix, or similar. This is done by bumping the "0".

In some cases you might not want to create sections based on a single field. In such cases you can use long hand notation, so the above was equivalent to:

If you wanted to look for self-contradictory bugs, you might have sections such as:

Ideas

Some ideas.

request@ interface

Err, this isn't implemented yet.

By example:

user licensing@release.debian.org

usercategory licensing-problems [hidden]
 * License [tag:]
  + GNU Free Documentation License [1:gfdl]
  + Open Publication License [4:opl]
  + Other License: Unmodifiable [2:unmodifiable]
  + Test [5:do-not-take-serious]
  + Unknown license, wtf [3:]

usercategory djpig-1
 * severity
 * licensing-problems
 * status

Some notes.

How should this be stored?

Category: licensing-problems
Hidden: yes
Cat1: License
Cat1Prefix: tag:
Cat1Options:
 gfdl - GNU Free Documentation License
 opl - Open Publication License
 unmodifiable - Other License: Unmodifiable
 do-not-take-serious - Test
Cat1Default: Unknown license, wtf
Cat1Order: 1,4,2,5,3

Category: djpig-1
Cat1: severity
Cat2: licensing-problems
Cat3: status

And as well as this we need a data structure that can hold the information in memory. What should it look like?

$user->{"category"} =
 { "licensing-problems" => 
     [ {
        "nam" => "License"
        "pre" => "tag:",
        "pri" => [ "gfdl", "opl", "unmodifiable", "do-not-take-serious" ],
        "ttl" => [ "GNU Free Do...", ... ],
        "def" => "Unknown license, wtf"
        "ord" => [ 1, 4, 2, 5, 3 ]
     } ]
   "djpig-1" => [ "severity", "licensing-problems", "status" ],
 }
$user->{"visible_cats"} = ["djpig-1"]

debbugs/SectioningNotes (last edited 2005-10-06 10:51:33 by AnthonyTowns)