@status versus @bug_status in email_in.pl - docs unclear, results inconsistent

RESOLVED FIXED in Bugzilla 3.6

Status

()

--
minor
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: bob.crystaltech, Assigned: mkanat)

Tracking

3.0.3
Bugzilla 3.6

Details

(Whiteboard: [blocker will fix])

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; en-us) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13
Build Identifier: 3.0.3

The email interface docs at:

<http://www.bugzilla.org/docs/3.0/html/api/email_in.html>

don't provide specific details of how to change a bug's status. The page does, however, refer to here:

<http://www.bugzilla.org/docs/3.0/html/api/Bugzilla/WebService/Bug.html#create>

for a list of fields that can be changed. On that page, the status field is listed as 'status'. As it turns out, using @status in a message sometimes works, sometimes doesn't, and @bug_status works when @status doesn't.

Also, the status change can fail, or an invalid field/value pair be specified, and Bugzilla will still add the comment without generating any sort of error (to STDERR or via e-mail), which goes against the Errors section of the first docs page, above.

Reproducible: Always

Steps to Reproduce:
Note: I've removed the unimportant message headers just to keep things cleaner.

Bug 1 status: NEW

Test message:

	Date: Wed, 16 Apr 2008 14:59:13 -0700
	Subject: [bug 1]
	From: xxx@xxx.xxx
	To: Bugzilla <xxx@xxx.xxx>
	
	@status = ASSIGNED
	
	This is a test.

Run script:

	[bugzilla@bug bugzilla]$ email_in.pl -vvv < test.txt 
	Parsing Email
	Splitting Body and Attachments [Type: text/plain]...
	Part Content-Type: text/plain
	Part Character Encoding: iso-8859-1
	Body:
	@status = ASSIGNED
	
	This is a test.
	
	Parsed Fields:
	$VAR1 = {
				 'comment' => 'This is a test.
	',
				 'status' => 'ASSIGNED',
				 'bug_id' => '1',
				 'reporter' => 'xxx@xxx.xxx'
			  };
	
	Updating Bug 1...

Result:
	
	Bug 1 status: NEW
	Comment added to bug.

Expected result:

	Bug 1 status: ASSIGNED
	Comment added to bug
	
Or, if @status is not correct, expected result (per Errors section of docs):

	Bug 1 status: NEW
	No comment added
	Error e-mailed back
	
---------------------------

Bug 1 status: NEW

Test message:

	Date: Wed, 16 Apr 2008 14:59:13 -0700
	Subject: [bug 1]
	From: xxx@xxx.xxx
	To: Bugzilla <xxx@xxx.xxx>
	
	@foo = ASSIGNED
	
	This is a test.

Run script:
	
	[bugzilla@bug bugzilla]$ email_in.pl -vvv < test.txt 
	Parsing Email
	Splitting Body and Attachments [Type: text/plain]...
	Part Content-Type: text/plain
	Part Character Encoding: iso-8859-1
	Body:
	@foo = ASSIGNED
	
	This is a test.
	
	Parsed Fields:
	$VAR1 = {
				 'comment' => 'This is a test.
	',
				 'foo' => 'ASSIGNED',
				 'bug_id' => '1',
				 'reporter' => 'xxx@xxx.xxx'
			  };
	
	Updating Bug 1...

Result:
	
	Bug 1 status: NEW
	Comment added to bug.

Expected result (per Errors section of docs):

	Bug 1 status: NEW
	No comment added
	Error e-mailed back
		
---------------------------

Bug 1 status: NEW

Test message:

	Date: Wed, 16 Apr 2008 14:59:13 -0700
	Subject: [bug 1]
	From: xxx@xxx.xxx
	To: Bugzilla <xxx@xxx.xxx>
	
	@bug_status = ASSIGNED
	
	This is a test.

Run script:

	[bugzilla@bug bugzilla]$ email_in.pl -vvv < test.txt 
	Parsing Email
	Splitting Body and Attachments [Type: text/plain]...
	Part Content-Type: text/plain
	Part Character Encoding: iso-8859-1
	Body:
	@bug_status = ASSIGNED
	
	This is a test.
	
	Parsed Fields:
	$VAR1 = {
				 'bug_status' => 'ASSIGNED',
				 'comment' => 'This is a test.
	',
				 'bug_id' => '1',
				 'reporter' => 'xxx@xxx.xxx'
			  };
	
	Updating Bug 1...

Result (as expected if @bug_status were correct field name):
	
	Bug 1 status: ASSIGNED
	Comment added to bug

---------------------------

Bug 1 status: NEW

Test message:

	Date: Wed, 16 Apr 2008 14:59:13 -0700
	Subject: [bug 1]
	From: xxx@xxx.xxx
	To: Bugzilla <xxx@xxx.xxx>
	
	@status = RESOLVED
	@resolution = FIXED
	
	This is a test.

Run script:

	[bugzilla@bug bugzilla]$ email_in.pl -vvv < test.txt 
	Parsing Email
	Splitting Body and Attachments [Type: text/plain]...
	Part Content-Type: text/plain
	Part Character Encoding: iso-8859-1
	Body:
	@status = RESOLVED
	@resolution = FIXED
	
	This is a test.
	
	Parsed Fields:
	$VAR1 = {
				 'comment' => 'This is a test.
	',
				 'status' => 'RESOLVED',
				 'resolution' => 'FIXED',
				 'bug_id' => '1',
				 'reporter' => 'xxx@xxx.xxx'
			  };
	
	Updating Bug 1...

Result (as expected):
	
	Bug 1 status: RESOLVED
	Bug 1 resolution: FIXED
	Comment added to bug

Updated

11 years ago
Keywords: qawanted
(Reporter)

Updated

10 years ago
Version: unspecified → 3.0.3

Comment 1

9 years ago
This has been fixed as part of bug 526158 and the fix will be available in Bugzilla 3.5.3 (should be released next month).
Assignee: incoming.email → mkanat
Severity: normal → minor
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Depends on: 526158
Keywords: qawanted
Resolution: --- → FIXED
Whiteboard: [blocker will fix]
Target Milestone: --- → Bugzilla 3.6
You need to log in before you can comment on or make changes to this bug.