Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29988

unneeded delete transitions and marking methods in the Workflow Handler

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2.4.0
    • Workflow
    • None

    Description

      The deleteWorkflowMetadata() method implemented in WorkflowHandler.php is using two unnecessary methods:

      • deleteTransitionMetadataForWorkflow()
      • deleteMarkingForWorkflow()

      I noticed in the ezeditorialworkflow_transitions and ezeditorialworkflow_markings table definition following constraints:

      CONSTRAINT `fk_ezeditorialworkflow_markings_workflow_id` FOREIGN KEY (`workflow_id`) REFERENCES `ezeditorialworkflow_workflows` (`id`) ON DELETE CASCADE
      

      and

      CONSTRAINT `fk_ezeditorialworkflow_transitions_workflow_id` FOREIGN KEY (`workflow_id`) REFERENCES `ezeditorialworkflow_workflows` (`id`) ON DELETE CASCADE
      

      which has a referential action for a foreign key that allows us to delete data from child/related tables automatically when we delete the data from the parent table ezeditorialworkflow_workflows.

      We can remove some methods in the Handler and the Gateway as well and just keep the deleteWorkflowMetadata() method

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramzi.arfaoui-obsolete@ez.no Ramzi Arfaoui (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: