Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-2284

Attempt to delete Agreement Line fails

    XMLWordPrintable

Details

    • ERM Sprint 144, ERM Sprint 145
    • Bienenvolk
    • Morning Glory (R2 2022) Bug Fix
    • Legitimate regression

    Description

      Overview:

      Trying to delete an agreement line using the "Delete" option from the Agreement line view actions menu does not delete agreement line.

      Steps to Reproduce:

      1. Create an agreement and add an agreement line
      2. View the agreement line
      3. Click "Actions" and choose "Delete"
      4. Confirm deletion in dialogue

      Expected Results:

      Agreement line deleted
      Actual Results:

      Agreement line not deleted
      Additional Information:

      From Ethan:
      This...

      const { mutateAsync: deleteAgreementLine } = useMutation(
      [agreementLinePath, 'ui-agreements', 'AgreementLineViewRoute', 'deleteAgreementLine'],
      () => ky.put(agreementLinePath, {
      id: agreementId,
      items: [
      { id: lineId, _delete: true }
      ]
      }).then(() => {
      queryClient.invalidateQueries(AGREEMENT_LINES_ENDPOINT);
      history.push(`${urls.agreementView(agreementId)}${location.search}`);
      callout.sendCallout(
      { message: <FormattedMessage id="ui-agreements.line.delete.callout" /> }
      );
      }).catch(error => {
      callout.sendCallout({ type: 'error', timeout: 0, message: <FormattedMessage id="ui-agreements.line.deleteFailed.callout" values={{ message: error.message }} /> });
      })
      );
      

      Needs to be pointing at the agreements endpoint, not the agreements line one, and I need to add json key into that payload for it to send it down.

      URL:
      Interested parties:

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                ostephens Owen Stephens
                ostephens Owen Stephens
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases