If you leave @groups empty (to skip default groups) as below... @product Test1 @component comp1 @version 1.3 @groups ... email_in.pl complains that: "There is no version named '1.3 @groups' in the 'Test1' product." If I type |@groups =| (I added "="), then the parsing is fine. As "=" is optional since bug 526158, we should parse such cases correctly.
The problem comes from line 110: if ($line =~ /^\@(\S+)\s*(?:=|\s)\s*(.*)\s*/) If you simply pass @foo, it's appended to the previous field, because it doesn't match the regexp.
Ahh, probably putting a * after the = stuff and a +? on the \S would fix it.
Created attachment 461921 [details] [diff] [review] patch, v1 Also catch ^\@\S+\s*$
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
Attachment #461921 - Flags: review?(mkanat)
Summary: Wrong parsing if @foo has no data → Wrong parsing of email_in emails if some @field has no data
Comment on attachment 461921 [details] [diff] [review] patch, v1 Ah yeah, that's a simple, clever solution. :-)
Attachment #461921 - Flags: review?(mkanat) → review+
Committing to: bzr+ssh://email@example.com/bugzilla/trunk/ modified email_in.pl Committed revision 7410. Committing to: bzr+ssh://firstname.lastname@example.org/bugzilla/4.0/ modified email_in.pl Committed revision 7354. Committing to: bzr+ssh://email@example.com/bugzilla/3.6/ modified email_in.pl Committed revision 7149.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.