Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9185

The deleteWorkEffort service is incomplete and even wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Trunk, Upcoming Branch
    • None
    • workeffort
    • None

    Description

      This issue is very old (pre Apache) so all versions are affected (I just tested with R09.04)

      When you try to delete a Workeffort which has an established relationship with a RuntimeData or any of the entities Workeffort has a relation with (eg NoteData, RecurrenceInfo) using the the deleteWorkEffort service this one fails

      Also from my experience CustRequestWorkEffort is missing in deleteWorkEffort, would be to add

      <remove-related value-field="lookedUpValue" relation-name="CustRequestWorkEffort"/>
      

      Besides (minor) ApplicationSandbox is maybe missing in the implementation of deleteWorkEffort.
      There is indeed a workeffortId in ApplicationSandbox.
      So ApplicationSandbox is indirectly linked to Workeffort by RuntimeData.
      But it can anyway be deleted by a simple delete-by-and (or alike), so not a problem for deleteWorkEffort, though this case could be handled there also.

      Summary: the deleteWorkEffort service needs more work. The only solution I see is to remove the FK from the Workeffort (ie put null in the related field if it's not) and then deleted the related entity instead of directly calling remove-related

      Attachments

        Issue Links

          Activity

            People

              jleroux Jacques Le Roux
              jleroux Jacques Le Roux
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: