Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1521 disable life event form delete if still used #1531

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

gchi25
Copy link
Collaborator

@gchi25 gchi25 commented Jul 3, 2024

PR Summary

This work ensures life event form content can not be delete if still used.
If a life event form still used, it lists the contents that use this this life event form and disables the delete confirmation button.

Related Github Issue

Detailed Testing steps

To test in local development site or in dev site.

  • Pull changes locally
  • Make local development site up at http://localhost
  • Navigate to admin/content?combine=&type=bears_life_event_form&status=All&langcode=All
  • Go to life event form "Benefit finder: death of a loved one" edit page
  • Click Delete
  • Verify the warning message "cannot delete the life event form" and list of life event forms
  • verify that no Delete confirmation button

image

  • Go to life event form "Benefit finder: retirement" edit page
  • Remove life event form "Benefit finder: death of a loved one" in relevant benefit
  • Click Save
  • Go to life event form "Benefit finder: disability" edit page
  • Remove life event form "Benefit finder: death of a loved one" in relevant benefit
  • Click Save

Now delete life event form "Benefit finder: death of a loved one" again

  • Go to life event form "Benefit finder: death of a loved one" edit page
  • Click Delete
  • Verify message "This action cannot be undone"
  • Verify message "The following entity references will be skipped and leave orphans" and list of benefits
  • Click Delete button to delete this life event form
  • Verify life event form "Benefit finder: death of a loved one" deleted

@gchi25 gchi25 requested a review from scottqueen-bixal July 3, 2024 13:29
@gchi25 gchi25 self-assigned this Jul 3, 2024
@scottqueen-bixal scottqueen-bixal merged commit e62596b into dev Jul 9, 2024
7 checks passed
@scottqueen-bixal scottqueen-bixal deleted the 1521-disable-life-event-form-delete-if-used branch July 9, 2024 17:26
@diegocob
Copy link
Collaborator

Went through the QA steps and it's working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot delete life event form if still used
3 participants