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

fix: handle the deletion of subtemplate answers #918

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

deepaksftc
Copy link
Contributor

@deepaksftc deepaksftc commented Jan 22, 2025

Description

This PR introduces a fix to clear the answers of dependent generic template questions when their conditions are not satisfied.

Motivation and Context

The change is required to maintain the integrity of the data and avoid any confusion or misinformation due to the persistence of answers that are no longer relevant or correct. This improves the user experience and ensures the accuracy of the information presented to the users.

Changes

  1. Introduced new functionality to delete old answers satisfying certain conditions.
  2. Extended the deleteOldAnswers function to include answers and agent parameters to better handle the deletion process.
  3. Added deleteSubTemplatesAnswers function to handle the deletion of subtemplate answers when their parent question's conditions are not met.

How Has This Been Tested?

Fixes Issue

UserOfficeProject/issue-tracker#1261

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@deepaksftc deepaksftc changed the title fix: clear dependent generic template question's answers when condition not satisfied fix: handle the deletion of subtemplate answers Jan 23, 2025
@deepaksftc deepaksftc requested review from a team and CarinaLobley and removed request for a team January 23, 2025 10:07
@deepaksftc deepaksftc marked this pull request as ready for review January 23, 2025 10:07
@deepaksftc deepaksftc requested a review from a team as a code owner January 23, 2025 10:07
@deepaksftc deepaksftc requested review from RasmiaKulan and removed request for a team January 23, 2025 10:07
@bolmsten bolmsten requested review from yoganandaness and removed request for CarinaLobley January 24, 2025 09:39
@deepaksftc deepaksftc requested a review from mutambaraf January 27, 2025 08:54
@deepaksftc deepaksftc force-pushed the 1261-dev branch 2 times, most recently from 4225f6b to 68a1ced Compare January 27, 2025 14:59
Copy link
Contributor

@mutambaraf mutambaraf left a comment

Choose a reason for hiding this comment

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

Looks good except a few comments.

@deepaksftc deepaksftc requested a review from mutambaraf January 29, 2025 12:07
Copy link
Contributor

@yoganandaness yoganandaness left a comment

Choose a reason for hiding this comment

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

Looks fine. But can we add an e2e.

Copy link
Contributor

@yoganandaness yoganandaness left a comment

Choose a reason for hiding this comment

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

Looks fine. But can we add an e2e.

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

Successfully merging this pull request may close these issues.

3 participants