Re: Some questions about file handling + some other things
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Mar 19, 2021 at 10:10:08PM +0100, Nagy Gabor wrote: > My first question is about the web interface (and in fact, more > general). My observations after playing with @file and @file-1 etc. > form variables. Maybe it will be useful to others, and you can correct > me if I am wrong: Thanks! > 1. Multiple file upload is supported via @file: You can use a > <input type="file" name="@file" multiple> form input, or you can > add <input type="file" name="@file"> multiple times. (The second > solutions seems a bit ugly to me, it may depend on the browser.) > This is documented in the source code, but not on the website. I *think* this was never really documented because browser support for multiple upload is very rudimentary as John has already commented. > 2. By inspecting, it seems that if you want to use @file-1, @file-2, > @file-3,... instead of the above method (because you also want to set > some properties in the creation step), then some "-N" can be omitted. This is correct. > 3. You can create files (of FileClass) in the database even with > roundup-admin, simply just do "create file ..." and setting the content > property accordingly. (This was not obvious to me, sorry.) Yes > 4. I do not really understand how indexing works yet, and > the documentation is a bit terse on that topic. I just vaguely looked > into the code, but it seems that > The content of files (file, msg, etc.) are indexed (?), but only if > their type is text/plain (?). This indexing can (?) be disabled by > explicitly setting > > file = FileClass(db, "file", > name=String(), > content=String(indexme='no')) > > in schema.py. Btw shall I install Xapian, or not? :) All String properties are indexed, too, unless turning it off with the indexme parameter. > 5. The other thing I was interested in is journaling: As I see, the the > journaling of String() property changes cannot be disabled. (In my db > there is a "memo" for issues, which always increasing, but I did not > want to use a FileClass for this, and the history looks ugly. But the > history needs rewriting, anyway. ;) The only journalling that can currently be disabled is the journalling of Link an Multilink properties: If an item X links to an item Y, by default on link/unlink events a journal entry *in Y* is performed. This can be turned off. But changes of the Link/Multilink in X are still journalled. There is an API for modification of the journal, you can use this to regularly truncate the journal if you want to. > 6. Logical negation (or exclude_spec) is missing from filtering > machinery. :) Stuff like "status_notresolved string:-1,1,2,3,4,5,6,7;" > looks a bit strange in the page.html of the default templates... :) In fact you can do this, there is a trick where you can use negative numbers in the IDs to implement AND OR and NOT, I think only for Multilink properties, though. This is only in the source code and doesn't even have a regression test, I'm currently looking for examples I can use for implementing a test, see https://issues.roundup-tracker.org/issue2551119 It seems to be used in the standard template for some of the issue properties, unfortunately I'm not using the standard template ... > I hope I can deeply understand the code at some day, and I can commit > patches at some point. :) Yes, you're welcome, thanks for looking closely :-) Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]