-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] Domain Card - User can edit the date in expenses related to the assigned domain card #36616
Comments
Job added to Upwork: https://www.upwork.com/jobs/~010604e6d9dd675bc1 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
Triggered auto assignment to @miljakljajic ( |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Domain Card - User can edit the date in expenses related to the assigned domain card What is the root cause of that problem?The canEditFieldOfMoneyRequest logic doesn't align with the BE requirements to allow editing date field and it allows the edit of date field for domain card transaction unlike amount which is disabled as in here Lines 2162 to 2164 in 1c0d126
What changes do you think we should make in order to solve the problem?We should add a code before here Line 2162 in 1c0d126
or change Line 2162 in 1c0d126
to
What alternative solutions did you explore? (Optional) |
@miljakljajic Who can edit these fields? Is it that no one should edit these? |
Could someone add me to the "Domain Card tests - DO NOT DELETE" group? Alternatively, how can we create the domain card? Can we use a fake card for this purpose? |
@miljakljajic, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Is this accepting proposals? |
@brandonhenry Yes. @miljakljajic Bump on the above question 😄 |
@miljakljajic, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
For non-reimbursable expenses no one should be able to edit the date or amount. |
@miljakljajic @allroundexperts this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue is that users are currently able to edit the date field in expenses related to the assigned domain card without receiving any error message in the UI, even though such edits should not be allowed. The desired behavior is for the UI to present an error message when a user attempts to edit the date, effectively preventing the edit from being submitted to the backend. What is the root cause of that problem?The root cause of this problem lies in the frontend logic, specifically within the What changes do you think we should make in order to solve the problem?To resolve this issue, we need to implement a validation mechanism within the frontend that:
This could be achieved by enhancing the existing edit handling logic in the Here is a conceptual code snippet to illustrate the proposed enhancement: // Assuming this function is called when the user attempts to save their edits
function onSaveEdit(field, newValue) {
// Check if the field being edited is the date and if the transaction is for a domain card
if (field === 'Date' && isDomainCardTransaction(transaction)) {
// Prevent the save and display an error message
showError('Editing the date for domain card transactions is not allowed.');
return;
}
// Proceed with saving the edit if the above conditions are not met
saveEdit(field, newValue);
}
// Utility function to determine if a transaction is related to a domain card
function isDomainCardTransaction(transaction) {
// Implementation depends on how domain card transactions are identified
// This could involve checking the transaction's properties, associated policy, etc.
}
// Function to display error messages to the user
function showError(message) {
// Implementation depends on how errors are displayed in the UI
// This could involve setting state to trigger a modal, toast, or inline error message
} If this makes sense, I can provide specific areas |
ProposalPlease re-state the problem that we are trying to solve in this issue.Some card fields in expenses related to the card are editable (Date) and interactive (Card). I think in addition to being non-editable, it should also be non-interactive. What does that mean? If hovered/clicked, they shouldn't display a hand cursor or change to a hover style. Current state: GMT20240301-152519_Clip_Wildan.M.s.Clip.03_01_2024.mp4Suggested revision: GMT20240301-152714_Clip_Wildan.M.s.Clip.03_01_2024.mp4What is the root cause of that problem?We are not included Lines 2180 to 2184 in 5d2933d
And not disable interactive in card menu item: App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 405 to 413 in 5d2933d
What changes do you think we should make in order to solve the problem?Change this line to.
And add
What alternative solutions did you explore? (Optional) |
@miljakljajic, @allroundexperts Eep! 4 days overdue now. Issues have feelings too... |
PR ready |
@miljakljajic as a bug that doesn't block the release, I'm moving this into |
Thank you @trjExpensify |
Can we please get a new C+ here? I think @allroundexperts is busy and the pr is stuck for weeks. |
@FitseTLT The checklist is already complete. Apologies for the delay here. If I'm unable to complete the review by tomorrow, we can re-assign. |
@FitseTLT I reviewed this yesterday and left some comments. |
This issue has not been updated in over 15 days. @robertjchen, @miljakljajic, @allroundexperts, @FitseTLT eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Looks like the associated change was deployed- closing this out unless there are any other remaining items? |
@robertjchen Payment hasn't been issued yet, so please re-open it. @miljakljajic Payment is overdue, can u please process the payment, the linked pr has been deployed to production three weeks ago. Thx |
@robertjchen, @miljakljajic, @allroundexperts, @FitseTLT Huh... This is 4 days overdue. Who can take care of this? |
@robertjchen, @miljakljajic, @allroundexperts, @FitseTLT 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
paid |
@miljakljajic Can we please have a payment summary here? Thanks! |
Reopening for payment summary. |
@allroundexperts is owed 500 USD for work reviewing this PR. |
$500 approved for @allroundexperts |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.42-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
Fields "Amount" and "Date" are not editable
Actual Result:
User has access to edit the date.
(User receives an error after editing the date, but can try to do it)
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6380969_1708019494480.Safari-Domain-Card-Date-Edit.1.mp4
Bug6380969_1708019494545.Desktop-Domain-Card-Date-Edit.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: