Re: How to set a default priority
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Apr 22, 2020 at 04:23:39PM +0200, R. Diez wrote: > > def add_prio_if_empty (db, cl, nodeid, newvalues): > > if 'priority' not in newvalues: > > newvalues ['priority'] = '1' # or whatever default you want > > > > I think as long as the user doesn't select anything from the menu the > > field will be left empty which is then caught by the proposed auditor. > > I am not sure whether that is what I wanted. From looking at your code > example and your comment above, it looks like the code would be intercepting > the new issue and setting a default priority if not already there. It would set the prio to the given item if the priority of the issue is empty at that point. No matter where it comes from, be it the web interface, xmlrpc, REST-API, or command-line interface via roundup-admin. > > But I want the priority automatically set to "normal" instead of "- no > selection -" when the user clicks on "Create New". - no selection - is equivalent to no value (None). > Well, first I would have to figure out how change the priority names. At the > moment, it looks like a mixture of types (bug, feature, wish) and priorities > (critical, urgent). But a bug can be urgent, normal, or low priority, so it > is inconsistent. And, in any case, I was thinking about other things, and > not software development bugs. But I guess when I carefully read the docs > I'll find out how to do that myself. See other thread, you can do it via roundup-admin on the command-line. > So every now and then, you have to clean up, like you have to clean up > your mailbox every now and then. For example, in Thunderbird, you can: [...] > Where does Roundup store attachments? In the database, or in a > separate "upload" directory? In a separte directory. Per default below the 'db' directory in the tracker home. But can be configured in the section [main] via the variable "database". So you can either delete files (roundup will display a message if it cannot find a file which it thinks it should), or truncate the file to zero length. Note that messages for issues are also stored below the db directory, files are below db/files/file and messages below db/files/msg > If files are in directory, one could just delete files based on creation > date. And write in the user guide for the company users: "Please use the > file server for long-lived attachments. Attachments in the issue tracker are > automatically deleted after 1 year". Yes, see above, truncation is probably better to avoid error messages. > If files are in the internal database, is there some reasonably > easy-to-use tool to browse them by size and delete them? You can again use roundup-admin and set the content of a file to the empty string. (I'm using -i . when I'm in the tracker directory, this avoids having to answer the question where the tracker home is). roundup-admin -i . set file1 content= Where you would replace the id '1' of the file with the file you really want to modify, of course. Other possibilities include the REST-API where you can do this from remote. Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: http://www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]