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

chore(trashBin): add management command to fix partially restored projects TASK-1645 #5565

Merged
merged 6 commits into from
Mar 3, 2025

Conversation

noliveleger
Copy link
Contributor

@noliveleger noliveleger commented Mar 3, 2025

📣 Summary

Added a management command to detect and fix projects that were not fully restored from the trash.

📖 Description

A management command fix_xform_not_put_back_from_trash has been introduced to address cases where projects were not completely restored from the trash.

💭 Notes

Part of #5563

👀 Preview steps

Bug template:

  1. ℹ️ have an account and a project
  2. From the shell run
In [1]: XForm.objects.filter(kpi_asset_uid='<project_uid>').update(pending_delete=True)
Out[1]: 1
  1. run management command ./manage.py fix_xform_not_put_back_from_trash
  2. See output :

1 XForms restored!

@noliveleger noliveleger changed the base branch from main to release/2.024.36 March 3, 2025 10:34
@noliveleger noliveleger changed the title Fix pending delete xforms mgnt cmd Fix pending delete xforms mgnt cmd TASK-1648 Mar 3, 2025
@noliveleger noliveleger self-assigned this Mar 3, 2025
@noliveleger noliveleger changed the title Fix pending delete xforms mgnt cmd TASK-1648 Fix pending delete xforms mgnt cmd TASK-1645 Mar 3, 2025
@noliveleger noliveleger changed the title Fix pending delete xforms mgnt cmd TASK-1645 chore(trashBin) add management command to fix projects not full restored Mar 3, 2025
@noliveleger noliveleger changed the title chore(trashBin) add management command to fix projects not full restored chore(trashBin): add management command to fix partially restored projects Mar 3, 2025
@noliveleger noliveleger force-pushed the fix-pending-delete-xforms-mgnt-cmd branch from e5e99d6 to 8f1a481 Compare March 3, 2025 10:44
@noliveleger noliveleger marked this pull request as ready for review March 3, 2025 10:46
@noliveleger noliveleger requested a review from rajpatel24 March 3, 2025 10:46
@noliveleger noliveleger changed the base branch from release/2.024.36 to main March 3, 2025 10:47
@noliveleger noliveleger requested a review from jnm as a code owner March 3, 2025 10:47
@noliveleger noliveleger changed the base branch from main to release/2.024.36 March 3, 2025 10:47
@noliveleger noliveleger removed the request for review from jnm March 3, 2025 10:51
Copy link
Contributor

@rajpatel24 rajpatel24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@noliveleger noliveleger merged commit 667943d into release/2.024.36 Mar 3, 2025
6 checks passed
@noliveleger noliveleger deleted the fix-pending-delete-xforms-mgnt-cmd branch March 3, 2025 12:50
@noliveleger noliveleger changed the title chore(trashBin): add management command to fix partially restored projects chore(trashBin): add management command to fix partially restored projects 1645 Mar 4, 2025
@noliveleger noliveleger changed the title chore(trashBin): add management command to fix partially restored projects 1645 chore(trashBin): add management command to fix partially restored projects TASK-1645 Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants