view website/issues/detectors/severityauditor.py @ 5876:716d50585c8d

Fix Link/Multilink searching .. for the case that a key property may contain numeric values. This already was correct for menu (in an item template) but was doing the wrong thing for index templates.
author Ralf Schlatterbeck <rsc@runtux.com>
date Mon, 02 Sep 2019 16:11:17 +0200
parents 0942fe89e82e
children
line wrap: on
line source


def init_severity(db, cl, nodeid, newvalues):
    """Make sure severity is set on new issues"""
    if 'severity' in newvalues and newvalues['severity']:
        return

    normal = db.severity.lookup('normal')
    newvalues['severity'] = normal

def init(db):
    db.issue.audit('create', init_severity)

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