view website/issues/detectors/statusauditor.py @ 5622:2a7d23a098ca

Make @Routing.route('/') decoration work. This decoration matches 'rest/' (note trailing /). Make sure that a path reduced to "rest" is rewritten to "rest/" so we can handle the root of the rest tree.
author John Rouillard <rouilj@ieee.org>
date Sun, 24 Feb 2019 21:46:24 -0500
parents 0942fe89e82e
children 13e8f188f8dd
line wrap: on
line source

def preset_new(db, cl, nodeid, newvalues):
    """ Make sure the status is set on new issues"""

    if 'status' in newvalues and newvalues['status']:
        return

    new = db.status.lookup('new')
    newvalues['status'] = new


def init(db):
    # fire before changes are made
    db.issue.audit('create', preset_new)

Roundup Issue Tracker: http://roundup-tracker.org/