The default bug view has changed. See this FAQ.

email_in.pl doesn't let me set timetracking fields

RESOLVED FIXED in Bugzilla 3.6

Status

()

Bugzilla
Incoming Email
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

({dataloss})

Bugzilla 3.6
dataloss
Bug Flags:
approval +
approval4.0 +
blocking4.0 +
approval3.6 +
blocking3.6.2 +

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.40 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
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?

Updated

7 years ago
Flags: blocking4.0?
Flags: blocking4.0+
Flags: blocking3.6.2?
Flags: blocking3.6.2+
Target Milestone: --- → Bugzilla 3.6
(Assignee)

Comment 1

7 years ago
Created attachment 461962 [details] [diff] [review]
patch, v1
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
Attachment #461962 - Flags: review?(mkanat)
(Assignee)

Comment 2

7 years ago
Created attachment 461968 [details] [diff] [review]
patch, v2

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 3

7 years ago
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 4

7 years ago
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)

Updated

7 years ago
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
(Assignee)

Comment 5

7 years ago
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
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.