Closed Bug 583622 Opened 14 years ago Closed 14 years ago

email_in.pl doesn't let me set timetracking fields

Categories

(Bugzilla :: Incoming Email, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

(Keywords: dataloss)

Attachments

(1 file, 1 obsolete file)

email_in.pl calls Bugzilla::Bug::map_fields() from parse_mail() before calling Bugzilla->set_user(), so all timetracking fields are deleted by map_fields() because at this point, the Bugzilla->user object is not set yet:

    unless (Bugzilla->user->is_timetracker) {
        delete @field_values{qw(estimated_time remaining_time deadline)};
    }

Bugzilla->set_user() should be called before calling map_fields().
Flags: blocking4.0?
Flags: blocking3.6.2?
Flags: blocking4.0?
Flags: blocking4.0+
Flags: blocking3.6.2?
Flags: blocking3.6.2+
Target Milestone: --- → Bugzilla 3.6
Attached patch patch, v1 (obsolete) — Splinter Review
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
Attachment #461962 - Flags: review?(mkanat)
Attached patch patch, v2Splinter Review
map_fields() is only called by email_in.pl and Bug.search, Bug.create and Bug.update. When creating or updating a bug, validators already make sure the user is in the timetracking group. So the only place which needs to remove time-related fields is Bug.search.
Attachment #461968 - Flags: review?(mkanat)
Comment on attachment 461968 [details] [diff] [review]
patch, v2

This is generally simpler...seems like we should just take this on all the branches, no?
Attachment #461968 - Flags: review?(mkanat) → review+
Comment on attachment 461962 [details] [diff] [review]
patch, v1

Okay, let's just take the simple one on the branches, too.
Attachment #461962 - Attachment is obsolete: true
Attachment #461962 - Flags: review?(mkanat)
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Bug.pm
modified Bugzilla/WebService/Bug.pm
Committed revision 7416.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/Bug.pm
modified Bugzilla/WebService/Bug.pm
Committed revision 7359.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/Bug.pm
modified Bugzilla/WebService/Bug.pm
Committed revision 7152.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.