Roundup Tracker - Issues

Issue 517440

classification
cgi_client.py depends on db schema
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed duplicate
:
: richard : richard, schlatterbeck
Priority: normal :

Created on 2002-02-14 10:52 by schlatterbeck, last changed 2002-02-14 22:21 by richard.

Messages
msg192 Author: [hidden] (schlatterbeck) Date: 2002-02-14 10:52
worse yet it depends on the contents of the status
entries. I have tried to create a new schema similar to
what we are currently using with gnats. In this schema
I changed the contents of the status to
    stat = db.getclass ('status')
    stat.create (name="open",      order="1")
    stat.create (name="suspended", order="2")
    stat.create (name="feedback",  order="3")
    stat.create (name="analyzed",  order="4")
    stat.create (name="working",   order="5")
    stat.create (name="testing",   order="6")
    stat.create (name="closed",    order="7")
With these settings the cgi-interface produces
exceptions. There are lots of occasions like
<a
href="issue?assignedto=%(userid)s&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb...
in cgi_client.py

In my opinion the cgi_client should be completely
independent of the schema in use. 

Things like (in _changenode of cgi_client.py)
# set status to chatting if 'unread' or 'resolved'
try:
    # determine the id of 'unread','resolved' and
'chatting'
    unread_id = self.db.status.lookup('unread')
    resolved_id = self.db.status.lookup('resolved')
    chatting_id = self.db.status.lookup('chatting')
    current_status = cl.get(self.nodeid, 'status')
    if props.has_key('status'):
        new_status = props['status']

or 

# set status to 'unread' if not specified - a status of
'- no
# selection -' doesn't make sense
(in _createnode in cgi_client.py)

should probably moved to a schema-specific detector (a
reactor in this case). This can set the status to some
default if none is given when submitting a new report
or changing an existing one in a certain way. Maybe
once a status (or other selector) is selected, we may
not want to permit the user to set it again to
undefined -- that could well go into the web interface
-- although in might also be nice to implement this in
detectors.

I'll probably try to look into the cgi-script a little
closer to make it more independent of the schema. 

Keep up the good work! I'm quite impressed of how much
more (than our current tracking system gnats) roundup
is already doing....
msg193 Author: [hidden] (richard) Date: 2002-02-14 22:21
Logged In: YES 
user_id=6405

You can customise the header by overriding the pagehead()
method of the cgi Client class (in your instance's
interfaces.py file).

Yes, this is suboptimal, and yes, there is a desire to see
the header templated and smarter. No, no-one's done any work
on it. Yes, we'd welcome someone doing the work on it :)

I have just added feature 517734 "web header customisation
is obscure" to the tracker. Please feel to contribute there!
History
Date User Action Args
2002-02-14 10:52:05schlatterbeckcreate