Closed
Bug 429431
Opened 18 years ago
Closed 16 years ago
@status versus @bug_status in email_in.pl - docs unclear, results inconsistent
Categories
(Bugzilla :: Incoming Email, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: bob.crystaltech, Assigned: mkanat)
References
Details
(Whiteboard: [blocker will fix])
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
| Reporter | ||
Updated•17 years ago
|
Version: unspecified → 3.0.3
Comment 1•16 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).
You need to log in
before you can comment on or make changes to this bug.
Description
•