Download & Extend

Allow new comment timestamp to be passed

Project:Drupal core
Version:6.x-dev
Component:node.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

We allow nodes to receive their 'created' date passed into node_save(). The nearest analog to a comment's "created" date, however, is 'timestamp'. Timestamp isn't settable from outside comment_save(); some modules (such as mailhandler) just /assume/ that it is. This patch is necessary for imports from other applications, but also matches the patterns already established in node_save().

AttachmentSizeStatusTest resultOperations
comment_timestamp.patch399 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment_timestamp_0.patch.View details | Re-test

Comments

#1

Status:needs review» needs work

A couple of things

patch is missing -u option (I am deeply shocked)
I think we should have 'created' and 'updated' timestamps for comments, this may be out of scope though.

#2

Status:needs work» needs review

If the way a patch was generated is a code quality issue, please set this back. Otherwise, pithy.

(And yeah, I agree: created/updated timestamps are out of scope here.)

#3

Reapplied. This was the first time I had used cvs since I reinstalled the OS, so didn't have a .cvsrc file with the proper diff settings.

AttachmentSizeStatusTest resultOperations
comment_timestamp.patch732 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment_timestamp_1.patch.View details | Re-test

#4

Status:needs review» reviewed & tested by the community

Works as advertised ... fapi protects us from any unauthorized user sending a timestamp.

#5

Status:reviewed & tested by the community» needs work

I'd love to commit this patch but it no longer applies. Needs a quick re-roll.

#6

Attached. Sorry for the delay. Set to RTBC after re-roll.

AttachmentSizeStatusTest resultOperations
253577_comment_timestamp.patch711 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 253577_comment_timestamp.patch.View details | Re-test

#7

Status:needs work» reviewed & tested by the community

#8

Status:reviewed & tested by the community» fixed

Committed to CVS. Thanks Morbus.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#10

Version:7.x-dev» 6.x-dev
Assigned to:Morbus Iff» Anonymous
Status:closed (fixed)» patch (to be ported)

#11

Status:patch (to be ported)» reviewed & tested by the community

This patch only works with Drupal 6.3.

AttachmentSizeStatusTest resultOperations
comment_save.patch580 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment_save.patch.View details | Re-test

#12

Status:reviewed & tested by the community» fixed

6.x patch contained tabs, so fixed those before committing. Will be in next Drupal 6 release, thanks!

#13

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#14

Component:comment.module» node.module
Assigned to:Anonymous» cor3huis
Status:closed (fixed)» active

The original issue was invalid to begin with, "node_presave" should have been used I bet.

#15

Assigned to:cor3huis» Anonymous
Status:active» closed (fixed)

This is *not* the same issue. This issue was about *comments*.

I not sure I understand what you believe needs fixing in node_save(): by design, you can set $node->created, but not $node->changed, which will always be the timestamp of when node_save() was called.

Anyway, really not the same issue. Please open a different issue (targeted at Drupal 7, we always fix bug in the highest version first) and describe your use case there.

#16

Status:closed (fixed)» needs review

THX

#17

Status:needs review» closed (won't fix)