Closed Bug 377025 Opened 18 years ago Closed 17 years ago

email_in.pl doesn't allow you to close a bug

Categories

(Bugzilla :: Incoming Email, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: ds3899, Assigned: LpSolit)

References

Details

(Whiteboard: [doesn't affect 3.2; 3.0.x only])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060202 Fedora/1.0.7-1.2.fc4 Firefox/1.0.7 Build Identifier: 3.0rc1 sending an email with @bug_status=CLOSED sets the bug_status=RESOLVED resolution=FIXED, where it should be set to bug_status=CLOSED, resolution=FIXED Also, if the bug has a bug_status=CLOSED and resolution=FIXED sending a email with the same will result in the bug_status being changed back to RESOLVED and the resolution remains as FIXED. The following line: if ($fields{'resolution'}) { changes to if ($fields{'resolution'} && !($fields{'bug_status'} =~ /closed/i) ) { fixes the problem. Reproducible: Always Steps to Reproduce: 1.Send email with containing @bug_status=RESOLVED as well as other appriopriate values. You see that the status changes from new to RESOLVED 2 manually close the bug, now bug_status=CLOSED. 3. send email with bug_status=CLOSED and it will change back to bug_status=RESOLVED. Also, you can do steps 1 and 3 and the bug_status will not change to CLOSED.
Component: Creating/Changing Bugs → Incoming Email
Keywords: qawanted
Version: unspecified → 3.0
Depends on: 418863
I can reproduce as well. We will have to fix bug 418863 first to avoid corrupted data.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: qawanted
Whiteboard: [doesn't affect 3.2; 3.0.x only]
Target Milestone: --- → Bugzilla 3.0
Assignee: create-and-change → LpSolit
Attached patch patch, v1Splinter Review
Now correctly handles @bug_status = CLOSED. As explained in bug 418863, you cannot go from NEW to CLOSED in one step. That's not allowed by the (hardcoded) workflow in Bugzilla 3.0. But @bug_status = CLOSED will now correctly change the status of a resolved bug to CLOSED. In the same way, @resolution = FIXED (without @bug_status being specified!) will correctly change the resolution of a resolved bug to FIXED, leaving its status alone. If both @bug_status and @resolution are specified, then @bug_status takes precedence (said otherwise, @resolution can and should only be set together with @bug_status = RESOLVED). This patch also fixes the incorrect behavior when reopening bugs. It must call "reopen" instead of "clearresolution", which has another meaning.
Attachment #311007 - Flags: review?(mkanat)
Comment on attachment 311007 [details] [diff] [review] patch, v1 Sure, looks fine. Another reason why we should implement set_all and switch email_in to use it.
Attachment #311007 - Flags: review?(mkanat) → review+
Status: NEW → ASSIGNED
Flags: approval3.0+
3.0.3: Checking in email_in.pl; /cvsroot/mozilla/webtools/bugzilla/email_in.pl,v <-- email_in.pl new revision: 1.5.2.8; previous revision: 1.5.2.7 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: