Closed Bug 467171 Opened 16 years ago Closed 16 years ago

Editing attachments doesn't update the Last-Modified timestamp

Categories

(Bugzilla :: Attachments & Requests, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: himorin, Assigned: himorin)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch v.1 (from a japanese user) (obsolete) — Splinter Review
After editing attachments, Last-Modified in show_bug header isn't updated even if the bug-editing history is updated.
Attachment #350587 - Flags: review?
Attached patch patch v.2 (obsolete) — Splinter Review
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?
Attachment #350593 - Flags: review? → review-
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.
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
No, I'm pretty sure this has always been the case, and we should investigate carefully to see if changing it will break anything.
Yeah, I checked in 2.22.6, and the bug was already there.
Flags: blocking3.2.1+ → blocking3.2.1-
(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
Attached patch patch v.3Splinter Review
updated one.
# sorry for forgetting to attach :-)
Attachment #350593 - Attachment is obsolete: true
Attachment #350753 - Flags: review?
Attachment #350753 - Flags: review? → review?(LpSolit)
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+
Severity: normal → minor
Flags: approval+
Target Milestone: Bugzilla 3.2 → Bugzilla 3.4
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
Closed: 16 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: