changeset 39:45bb7b516edb

document previous better
author David A. Holland
date Sun, 15 Jun 2014 17:28:02 -0400
parents 68a4f2d8930e
children 44c1509055c7
files database/schema/bugs.sql database/schema/config.sql doc/swallowtail.pdf doc/swallowtail.tex
diffstat 4 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/database/schema/bugs.sql	Sun Jun 15 17:21:54 2014 -0400
+++ b/database/schema/bugs.sql	Sun Jun 15 17:28:02 2014 -0400
@@ -35,6 +35,14 @@
 	-- should be nulled.
 	timeout_date timestamp	null,
 	timeout_state text	null references states (name),
+	check (timestamp is null == timeout_state is null),
+
+	-- intended constraint:
+	-- select * from PRs, states where PRs.state = states.name
+	--    and states.timeout <> PRs.timeout_date is not null
+	-- should always return empty.
+	-- (All PRs in timeout states should have timeouts, and those
+	-- not in timeout states should not.)
 
 	-- fixed-size history
 	arrival_schemaversion int  not null,
--- a/database/schema/config.sql	Sun Jun 15 17:21:54 2014 -0400
+++ b/database/schema/config.sql	Sun Jun 15 17:28:02 2014 -0400
@@ -46,15 +46,18 @@
 --    closed		resolved (one way or another)
 --    nagresponsible	the "responsible" users should get nag-mail
 --    nagsubmitter	the "submitter" users should get nag-mail
+--    timeout		bugs in this state should time out to another state
 --
 -- It is reasonable for multiple states to have the same settings;
 -- such states presumably mean different things in ways the database
 -- doesn't need to know about.
 --
 -- For example: "open" might be defined as
---     ("open", false, "bug is unresolved", false, true, false)
+--     ("open", false, "bug is unresolved",
+--	false, true, false, false)
 -- and "feedback" as
---     ("feedback", false, "awaiting submitter feedback", false, false, true)
+--     ("feedback", false, "awaiting submitter feedback",
+--	false, false, true, true)
 --
 CREATE TABLE states (
        name text		primary key,
Binary file doc/swallowtail.pdf has changed
--- a/doc/swallowtail.tex	Sun Jun 15 17:21:54 2014 -0400
+++ b/doc/swallowtail.tex	Sun Jun 15 17:28:02 2014 -0400
@@ -278,14 +278,15 @@
 and/or feedback mail should be sent.
 There is also an obsolete flag that prevents new uses of the state.
 
+States can be tagged for timeout support; when a PR is put into a
+state tagged for timeout (e.g. ``feedback'') you give a time and a
+reversion state, and if nothing happens in the meantime the state is
+automatically changed at the given time.
+
 NetBSD: we will start out with the same set of states as we have in
 GNATS, plus ``stuck''.
 (A PR is stuck if a respondent is needed and there are none.)
 
-XXX: when you put a PR into feedback state you should provide a
-timeout period and whether the PR should, if the timeout expires, be
-changed to ``stuck'' or ``closed''.
-
 \item
 The \emph{locked} flag.
 A locked PR cannot be edited or commented on until it is first