Open lanitochka17 opened 4 days ago
Triggered auto assignment to @mallenexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Hold and Delete button are present when the expense is paid in Search
The backend of the pay inside the search doesnt update the canHold
, canUnhold
and CanDelete
keys inside the transaction
we should modify the optimistic props to add the the canHold
, canUnhold
and CanDelete
as false and in case of failure it should be reverted:
const createActionLoadingData = (isLoading: boolean): OnyxUpdate[] => [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.SNAPSHOT}${hash}`,
value: {
data: transactionID
? {[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`]: {isActionLoading: isLoading, canHold: false, canUnhold: false,canDelete:false}}
: (Object.fromEntries(paymentData.map((item) => [`${ONYXKEYS.COLLECTION.REPORT}${item.reportID}`, {isActionLoading: isLoading}])) as Partial<SearchReport>),
},
},
];
https://github.com/user-attachments/assets/90ed4e1e-3561-4b5f-b66f-b36bd65a9a45
@luacmartins
This is a BE bug. The backend doesn't update an new value for canHold and CanDelete fields
Now that we're sending more data to Search, I think we might be able to remove the canHold
and canDelete
keys and rely on the App to compute these values. I'll investigate this solution next.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.66-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+kh0911001@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Hold and Delete button should not be present once the expense is paid
Actual Result:
Hold and Delete button are present when the expense is paid. The buttons only disappear after refreshing the page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/bf6ff86b-3ffe-470b-9b33-5b5918a9b628
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @luacmartinsIssue Owner
Current Issue Owner: @luacmartins