Custom workflow (almost) implemented
Frédéric Buclin
lpsolit at gmail.com
Sat May 19 22:04:18 UTC 2007
Hi all,
I have (almost) implemented custom workflow in Bugzilla 3.1. I still
have a few lines of code to fix, but it's mostly working. One thing I
have to think about is what to do with this UNCONFIRMED/REOPENED
behavior when reopening a closed bug ('closed' as in
RESOLVED/VERIFIED/CLOSED).
In Bugzilla 3.0 and older, if a bug has never been confirmed, reopening
it will set its state to UNCONFIRMED, else to REOPENED. Now that you can
set your own workflow, you could decide that RESOLVED -> REOPENED is
allowed, but RESOLVED -> UNCONFIRMED is not. In this case, the UI in
show_bug.cgi should display "Change status to REOPENED" even for bugs
which have never been confirmed.
On the other hand, if both -> UNCO and -> REOP are allowed, should the
UI behave in the old way and only display the "correct" one based on
everconfirmed, or assume that both should be displayed as both are
present in the workflow?
For consistency with Bugzilla 3.0 and older, I added a hack in the UI to
only display the "correct" one (either UNCO or REOP, but not both). So
if an admin disable RESOLVED -> UNCONFIRMED from the workflow and a bug
has never been confirmed, nothing will be displayed in the UI to reopen
it (because the status it expected to display (UNCO) is forbidden by the
workflow). On the other hand, you could say: if one transition is
forbidden, display the other one. But this is an even bigger hack. Also,
if both transitions are allowed, how does Bugzilla know if you really
expect the old behavior (select the correct one between UNCO and REOP)
or if you want to see both (display both UNCO and REOP)?
I thought it may be a good idea to have a new parameter to choose if you
want the old or new behavior. If you select 'old', then Bugzilla will
choose between UNCO and REOP. If you select 'new', Bugzilla will display
*all* allowed transitions (so you could see both UNCO and REOP at the
same time if your workflow says so). What is your opinion on it?
LpSolit
More information about the developers
mailing list