Download & Extend

hook_nodeapi -> delete does not clean up workflow_node_history table

Project:Workflow
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

it cleans up workflow_node table only:

<?php
   
case 'delete':
     
db_query("DELETE FROM {workflow_node} WHERE nid = %d", $node->nid);
      break;
?>

it should be:

<?php
   
case 'delete':
     
db_query("DELETE FROM {workflow_node} WHERE nid = %d", $node->nid);
     
db_query("DELETE FROM {workflow_node_history} WHERE nid = %d", $node->nid);
      break;
?>

Comments

#1

If you consider deletion an implied state (like creation), doesn't it make more sense to not delete the node's workflow history when the node is deleted?

E.g., What was the history of node 5? It was created, approved, published, retracted, and finally deleted. When the auditors come through, the history of the node can be examined.

#2

Status:active» closed (won't fix)

Hi,

With the release of Drupal 7, Drupal 5 is no longer receiving security updates, reviews, or development from many contributed modules. Since 5 is now considered a depreciated version, you really should seriously look into upgrading to Drupal 6 or 7. The newer versions of Drupal work better, have more support, and will be safer (literally! security patches!) for your website. We are currently working on a new release for Workflow to Drupal 7. In light of that, further support for Drupal 5 issues is infeasible at the moment. Please consider upgrading to Drupal 6 or 7 in the near future - you'll be glad you did.

- Bastlynn

Wont' fix for both reasons of version - and because jvandyk is right. The history table is a long term record for audit purposes.

nobody click here