Editing attachments doesn't update the Last-Modified timestamp

RESOLVED FIXED in Bugzilla 3.4

Status

()

Bugzilla
Attachments & Requests
--
minor
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: himorin, Assigned: himorin)

Tracking

Bugzilla 3.4
Bug Flags:
approval +
blocking3.2.1 -

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

9 years ago
Created attachment 350587 [details] [diff] [review]
patch v.1 (from a japanese user)

After editing attachments, Last-Modified in show_bug header isn't updated even if the bug-editing history is updated.
Attachment #350587 - Flags: review?
(Assignee)

Comment 1

9 years ago
Created attachment 350593 [details] [diff] [review]
patch v.2

Sorry, forgot to modify the patch from the original. (to prevent executing un-necessary lines)
Attachment #350587 - Attachment is obsolete: true
Attachment #350593 - Flags: review?
Attachment #350587 - Flags: review?

Updated

9 years ago
Attachment #350593 - Flags: review? → review-

Comment 2

9 years ago
Comment on attachment 350593 [details] [diff] [review]
patch v.2

>+  my $ut_flag = 0;

What means "ut_flag"? $updated would be a much better name. Could you update your patch accordingly?


>+    my $ut = $dbh->prepare('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?');
>+    $ut->execute($timestamp, $bug->id);

Please write a single ->do() call.

Comment 3

9 years ago
Is it a regression in 3.2, or has this bug been here forever?
Assignee: attach-and-request → shimono
Severity: minor → normal
Flags: blocking3.2.1+
Target Milestone: --- → Bugzilla 3.2

Comment 4

9 years ago
No, I'm pretty sure this has always been the case, and we should investigate carefully to see if changing it will break anything.

Comment 5

9 years ago
Yeah, I checked in 2.22.6, and the bug was already there.
Flags: blocking3.2.1+ → blocking3.2.1-
(Assignee)

Comment 6

9 years ago
(In reply to comment #2)
> (From update of attachment 350593 [details] [diff] [review])
> >+  my $ut_flag = 0;
> 
> What means "ut_flag"?

I don't know :-)
might be UpdaTe or Update_Txxxx? or something..

> $updated would be a much better name. Could you update your patch accordingly?

agree with this. > $updated

> >+    my $ut = $dbh->prepare('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?');
> >+    $ut->execute($timestamp, $bug->id);
> 
> Please write a single ->do() call.

Ah, yeah. ->do() might be better.

I'll update the patch later.

(In reply to comment #4)
> No, I'm pretty sure this has always been the case, and we should investigate
> carefully to see if changing it will break anything.

As comment #5 and mxr, Last-Modified timestamp might be simply forgotten..
Status: NEW → ASSIGNED
(Assignee)

Comment 7

9 years ago
Created attachment 350753 [details] [diff] [review]
patch v.3

updated one.
# sorry for forgetting to attach :-)
Attachment #350593 - Attachment is obsolete: true
Attachment #350753 - Flags: review?
(Assignee)

Updated

9 years ago
Attachment #350753 - Flags: review? → review?(LpSolit)

Comment 8

9 years ago
Comment on attachment 350753 [details] [diff] [review]
patch v.3

This change makes sense. If you edit attachment flags, the bug timestamp is updated. If you comment while editing the attachment, the bug timestamp is updated. But if you edit another attachment attribute, the bug timestamp is not updated, which is inconsistent.

Note that this will now trigger bug mid-air collisions if you edit a bug at the same time an attachment is updated, now for all attribute changes, with which I'm fine (we are consistent). So r=LpSolit, for but tip only.
Attachment #350753 - Flags: review?(LpSolit) → review+

Updated

9 years ago
Severity: normal → minor
Flags: approval+
Target Milestone: Bugzilla 3.2 → Bugzilla 3.4

Comment 9

9 years ago
Checking in attachment.cgi;
/cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v  <--  attachment.cgi
new revision: 1.150; previous revision: 1.149
done
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.