Last Comment Bug 229998 - bugzilla-submit 'Operating-System' and 'URL' fields are rejected
: bugzilla-submit 'Operating-System' and 'URL' fields are rejected
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: unspecified
: x86 Windows XP
-- minor (vote)
: Bugzilla 2.18
Assigned To: Christian Reis
: default-qa
Depends on:
Blocks: 230885
  Show dependency treegraph
Reported: 2004-01-03 16:37 PST by Joseph Heenan
Modified: 2012-12-18 20:46 PST (History)
4 users (show)
myk: approval+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Patch to correct problem with field_aliases (1.12 KB, patch)
2004-01-03 16:43 PST, Joseph Heenan
no flags Details | Diff | Splinter Review
kiko_v1: fix issues, add to testcase (2.86 KB, patch)
2004-01-14 05:07 PST, Christian Reis
no flags Details | Diff | Splinter Review

Description User image Joseph Heenan 2004-01-03 16:37:27 PST
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: 

The bugzilla-submit documentation and scripts refers to the field 'Operating-
System' field in several places, but trying to use the following input file:

Product: test
Version: dev-trunk
Component: Misc
Short-Desc: XXX test bug
Hardware: x86
Operating-System: Linux
Severity: critical
Keywords: test

XXX test comment

gives the error:

bugzilla-submit: invalid field: Operating-System

Changing 'Operating-System' in the input file to just 'OS' appears to yield 
correct results. The URL line is also rejected in a similar manner.

This is against a local bugzilla installation running the current HEAD.

Patch coming.

Reproducible: Always

Steps to Reproduce:
Comment 1 User image Joseph Heenan 2004-01-03 16:43:17 PST
Created attachment 138359 [details] [diff] [review]
Patch to correct problem with field_aliases

This patch fixes both problems.

The operating-system problem appears to be a typo, the behaviour now matches
the other code and the documentation.

The URL problem is because header_to_field does a 'lower()' call on the
incoming header before checking it for an alias, so all the aliases must be
written in lower case.
Comment 2 User image Christian Reis 2004-01-12 16:27:10 PST

a) do we want Operating-System or OS? I find the latter shorter and more to the
point, so it could be a matter of fixing the docs. I'm open for argument to the
contrary, though.

b) The comment you added is a bit confusing, since the set of tuples under it
has underscores :-) Should it be cleared up a bit?

Eric, any comments?
Comment 3 User image Joseph Heenan 2004-01-13 00:26:45 PST
Yeah, the comment is blatently wrong :-) Sorry guys.

I went for operating-system (rather than OS) because operating-system is used 
in one other place in the code as well as the docs.

But the command line long code for setting operating system is --os - I think 
I'm inclined to agree with you and will change it to use OS (and update the 
docs) unless anyone disagrees.

I'll produce an updated patch later on.
Comment 4 User image Christian Reis 2004-01-14 05:07:07 PST
Created attachment 139021 [details] [diff] [review]
kiko_v1: fix issues, add to testcase
Comment 5 User image Christian Reis 2004-01-14 05:08:11 PST
Note that this is code in contrib.
Comment 6 User image Joseph Heenan 2004-01-14 05:30:01 PST
You beat me to it kiko, thanks.

The changes look good to me.
Comment 7 User image Myk Melez [:myk] [@mykmelez] 2004-01-16 08:49:59 PST
Not sure contrib/ changes need approval (although contrib/ additions certainly
would), but here it is anyway; a=myk.
Comment 8 User image Christian Reis 2004-01-16 14:27:53 PST
Checkin done, thanks. Joe, if you can confirm that you've tested this to work
later on, I'd appreciate it.

/cvsroot/mozilla/webtools/bugzilla/contrib/bugzilla-submit/bugdata.txt,v  <-- 
new revision: 1.2; previous revision: 1.1
<--  bugzilla-submit
new revision: 1.3; previous revision: 1.2
 <--  bugzilla-submit.xml
new revision: 1.3; previous revision: 1.2

Comment 9 User image Joseph Heenan 2004-01-19 01:00:01 PST
kiko, I've tested the checked in version and it works fine. Thanks!
Comment 10 User image Cheryl 2004-09-19 01:56:00 PDT
This is a suggestion not only for this bug but also for the general.

Since on the description and additional comments list, there are always "reply"
shown, when you click into it, the description or the additional comments will
automatically repeat again in the column of Additional Comments. 

Is it better to have a optional feature for not repeat?
Comment 11 User image Christian Reis 2004-09-19 14:13:38 PDT
Cheryl, could you explain further what you mean?

Note You need to log in before you can comment on or make changes to this bug.