change policy to 60 days #225

Merged
axgu merged 4 commits from policy-update into main 2026-03-18 19:27:26 +00:00
axgu commented 2026-03-17 19:42:25 +00:00 (Migrated from github.com)
No description provided.
sentry[bot] (Migrated from github.com) reviewed 2026-03-17 19:43:51 +00:00
@ -149,3 +149,3 @@
notified and the property will be held for a minimum
of 90 days.
of 60 days.
</li>
sentry[bot] (Migrated from github.com) commented 2026-03-17 19:43:51 +00:00

Bug: The bulk archive feature uses a hardcoded 90-day retention period, which contradicts the updated 60-day policy displayed on the Policies.tsx page.
Severity: MEDIUM

Suggested Fix

In BulkArchiveButton.tsx, update the hardcoded value from 90 to 60 in the confirmation message text and in the days parameter of the API call payload. This will align the archival functionality with the updated 60-day retention policy.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: client/src/pages/Policies.tsx#L150

Potential issue: The pull request updates the policy page at
`client/src/pages/Policies.tsx` to state that items are held for a minimum of 60 days.
However, the `BulkArchiveButton.tsx` component was not updated accordingly. It still
contains a hardcoded 90-day value in both the user-facing confirmation modal and the API
call payload sent to `/api/items/archiveByDays`. This creates a discrepancy where items
between 60 and 90 days old are eligible for archival according to the new policy, but
the system will not actually archive them until they are older than 90 days, misaligning
system behavior with the stated business logic.

Did we get this right? 👍 / 👎 to inform future reviews.

**Bug:** The bulk archive feature uses a hardcoded 90-day retention period, which contradicts the updated 60-day policy displayed on the `Policies.tsx` page. <sub>Severity: MEDIUM</sub> <!-- BUG_PREDICTION --> <details> <summary><b title="Reference ID: `11917028/0`">Suggested Fix</b></summary> In `BulkArchiveButton.tsx`, update the hardcoded value from `90` to `60` in the confirmation message text and in the `days` parameter of the API call payload. This will align the archival functionality with the updated 60-day retention policy. </details> <details open> <summary><b title="Reference ID: `11917028/0`">Prompt for AI Agent</b></summary> ``` Review the code at the location below. A potential bug has been identified by an AI agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not valid. Location: client/src/pages/Policies.tsx#L150 Potential issue: The pull request updates the policy page at `client/src/pages/Policies.tsx` to state that items are held for a minimum of 60 days. However, the `BulkArchiveButton.tsx` component was not updated accordingly. It still contains a hardcoded 90-day value in both the user-facing confirmation modal and the API call payload sent to `/api/items/archiveByDays`. This creates a discrepancy where items between 60 and 90 days old are eligible for archival according to the new policy, but the system will not actually archive them until they are older than 90 days, misaligning system behavior with the stated business logic. ``` </details> <sub><i>Did we get this right? :+1: / :-1: to inform future reviews.</i></sub> <!-- <sub>Reference ID: `11917028`</sub>-->
sentry[bot] (Migrated from github.com) reviewed 2026-03-17 19:50:19 +00:00
sentry[bot] (Migrated from github.com) commented 2026-03-17 19:50:19 +00:00

Bug: The bulk archive confirmation modal shows "90 days", but the action archives items older than 60 days, misinforming the user about the operation's scope.
Severity: HIGH

Suggested Fix

Update the text in the confirmation modal in BulkArchiveButton.tsx to correctly state that items older than "60 days" will be archived, aligning the user-facing message with the backend action.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: client/src/components/BulkArchiveButton.tsx#L70

Potential issue: The confirmation dialog in `BulkArchiveButton.tsx` displays the message
"Are you sure you wish to archive all items older than 90 days?". However, the
corresponding API call sends a parameter of `days: 60`. This creates a mismatch where an
administrator, believing they are archiving items older than 90 days, will
unintentionally archive all items older than 60 days. This is a functional bug that
leads to incorrect data handling based on misleading UI text.
**Bug:** The bulk archive confirmation modal shows "90 days", but the action archives items older than 60 days, misinforming the user about the operation's scope. <sub>Severity: HIGH</sub> <!-- BUG_PREDICTION --> <details> <summary><b title="Reference ID: `11917354/0`">Suggested Fix</b></summary> Update the text in the confirmation modal in `BulkArchiveButton.tsx` to correctly state that items older than "60 days" will be archived, aligning the user-facing message with the backend action. </details> <details open> <summary><b title="Reference ID: `11917354/0`">Prompt for AI Agent</b></summary> ``` Review the code at the location below. A potential bug has been identified by an AI agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not valid. Location: client/src/components/BulkArchiveButton.tsx#L70 Potential issue: The confirmation dialog in `BulkArchiveButton.tsx` displays the message "Are you sure you wish to archive all items older than 90 days?". However, the corresponding API call sends a parameter of `days: 60`. This creates a mismatch where an administrator, believing they are archiving items older than 90 days, will unintentionally archive all items older than 60 days. This is a functional bug that leads to incorrect data handling based on misleading UI text. ``` </details> <!-- <sub>Reference ID: `11917354`</sub>-->
Yuxiang-Huang (Migrated from github.com) approved these changes 2026-03-18 19:18:39 +00:00
Yuxiang-Huang (Migrated from github.com) left a comment

LGTM

LGTM
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/lost-and-found!225
No description provided.