Re: mailgw argument parsing

Ralf Schlatterbeck <[email protected]> Wed, 23 Nov 2022 07:54:38 +0100
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Tue, Nov 22, 2022 at 03:20:05PM -0500, John P. Rouillard wrote:
> But I really don't have a leg to stand on anymore since the program
> documents multiple [-C]/-S segments are valid.
> 
> So I withdraw my objection. Feel free to update the docs (include the
> man page please) and merge. I agree once you get more than one set of
> -C/-S pairs in place, your -S class.prop=value is much cleaner.

Thanks!

Note that I think the feature is rarely used anyway.

I've also fixed the classname case, so if you have -c to set the default
class, you can now use the same classname in
-S classname.prop=value
the original implementation required that you used 'issue' even if your
issue-class was named differently. And I'll allow *several* issue
classes (for the case where the class is mentioned in the subject of a
reply).

And during testing I've discovered that the old code would try to set
the defined attributes on the class given in the message (the 'issue'
class) if you have something like an email with the subject

Subject: [keyword23] this is a test of setting keyword parameters

The call to get_class_arguments has class_type='issue' and
classname='keyword' and would try to apply the -S options for issue to
keyword. We do have unittests for this case with keyword in the subject
(but without -S options)!

My current implementation ignores these calls when the classname does
not match.

Thanks!
Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]