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

[$500] Status with custom time doesn't work #33558

Closed
1 of 6 tasks
m-natarajan opened this issue Dec 24, 2023 · 22 comments
Closed
1 of 6 tasks

[$500] Status with custom time doesn't work #33558

m-natarajan opened this issue Dec 24, 2023 · 22 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@m-natarajan
Copy link

m-natarajan commented Dec 24, 2023

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.16-3
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):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dylanexpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1703354936560399?thread_ts=1703016500.538419&cid=C049HHMV9SM

Action Performed:

  1. Access Profile > Status
  2. Add any custom status
  3. Click on Clear After > Custom > Date
  4. Click Save

Expected Result:

It should keep the date you select and save.

Actual Result:

Didn't keep my selected date, and I was unable to save the status

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Recording.354.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019c1da8c2e9f0e2ec
  • Upwork Job ID: 1738972785687736320
  • Last Price Increase: 2024-01-07
@m-natarajan m-natarajan added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 24, 2023
@melvin-bot melvin-bot bot changed the title Status with custom time doesn't work [$500] Status with custom time doesn't work Dec 24, 2023
Copy link

melvin-bot bot commented Dec 24, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019c1da8c2e9f0e2ec

Copy link

melvin-bot bot commented Dec 24, 2023

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 24, 2023
Copy link

melvin-bot bot commented Dec 24, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 24, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

@ishpaul777
Copy link
Contributor

ishpaul777 commented Dec 24, 2023

should be resolved after #33525 is merged and deployed

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Dec 24, 2023

since this bug is handled here: #33525
I am proposing a feature to prevent this bug in the future:

Proposal

Please re-state the problem that we are trying to solve in this issue.

The current issue is that within our codebase, instances of components like DatePicker are not consistently wrapped in InputWrapper when used within FormProvider. This inconsistency can lead to problems with state management and form validation, as InputWrapper is essential for correctly updating the form's state based on user input.

What is the root cause of that problem?

The primary cause of this issue is the lack of a defined coding standard or automated enforcement / warning mechanism ensuring that components are always wrapped in InputWrapper when used within FormProvider. This leads to situations where developers might inadvertently omit the InputWrapper, resulting in components that do not function as expected within the form context.

What changes do you think we should make in order to solve the problem?

To address this inconsistency and enforce a standard coding practice, I propose creating a custom ESLint rule specifically tailored for our project. This rule will automatically enforce the use of InputWrapper around components when they are children of FormProvider.

What alternative solutions did you explore? (Optional)

N/A

@Famzy-codes
Copy link

Famzy-codes commented Dec 24, 2023

Proposal

Problem Statement:
When attempting to set a custom date under "Clear After" within "Access Profile > Status" and saving, the selected date is not retained, leading to an inability to save the status with the expected date.

Root Cause Analysis:
Upon analysis, the issue appears to stem from the failure to persist the selected date in the "Clear After" field when saving the status. This indicates a breakdown in the data persistence mechanism associated with custom dates in this particular section of the application.

Proposed Solution:
To rectify this issue, I propose inspecting the data storage and retrieval mechanism linked with the "Clear After" functionality under the "Access Profile > Status." This would involve:

  1. Reviewing the code logic governing the handling of custom dates during the save operation.
  2. Identifying any errors or omissions in the data persistence flow related to storing and retrieving selected dates.
  3. Implementing necessary adjustments to ensure the proper storage and retrieval of custom dates when saving the status.

Alternative Solutions Explored:
Exploring alternative data storage approaches or utilizing client-side storage mechanisms was considered. However, the primary solution centers around rectifying the data persistence issue within the existing storage infrastructure to ensure the accurate saving of selected dates.

I'm prepared to delve into the codebase and address this data persistence issue promptly to ensure the accurate retention and saving of custom dates within the "Clear After" functionality of "Access Profile > Status."

Please note that any proposed changes will be thoroughly tested across supported platforms (MacOS: Chrome / Safari) to guarantee the resolution's effectiveness.

Copy link

melvin-bot bot commented Dec 24, 2023

📣 @Famzy-codes! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Copy link

melvin-bot bot commented Dec 24, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@Famzy-codes
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0169127a83f9114c17

Copy link

melvin-bot bot commented Dec 24, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@sofi-a
Copy link

sofi-a commented Dec 26, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Setting a custom clear status date clears the default/selected date and time.

What is the root cause of that problem?

Because the date picker is not wrapped with InputWrapper in the SetDatePage component, the clear after date value can't be accessed inside the submit function.

What changes do you think we should make in order to solve the problem?

Wrap the date picker in an InputWrapper.

<InputWrapper
    InputComponent={DatePicker}
    inputID="dateTime"
    label={translate('statusPage.date')}
    defaultValue={DateUtils.extractDate(customClearAfter)}
    minDate={new Date()}
/>

What alternative solutions did you explore? (Optional)

N/A

@kaushiktd
Copy link
Contributor

Please re-state the problem that we are trying to solve in this issue.

When attempting to set a custom date under "Clear After", the selected date is not saved or not worked

What is the root cause of that problem?

In the SetDatePage component, there seems to be an issue related to the date picker not being encapsulated within an InputWrapper. This omission is causing difficulty in accessing the cleared date value within the submit function. To elaborate, when a date is cleared, the absence of an InputWrapper around the date picker prevents the submit function from effectively retrieving the cleared date value.

What changes do you think we should make in order to solve the problem?

To resolve this issue, you can either utilize <InputWrapperWithRef/> in place of <DatePicker/>, or you can substitute <DatePicker/> with the following code on here:

<InputWrapperWithRef>
  <DatePicker />
</InputWrapperWithRef>

Video:

https://drive.google.com/file/d/1UScOd8VJi1v-e6XqnywjCjEqL0E4PyXb/view?usp=sharing

@melvin-bot melvin-bot bot added the Overdue label Dec 27, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

@eVoloshchak, @anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Dec 31, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 1, 2024

@eVoloshchak, @anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Copy link

melvin-bot bot commented Jan 2, 2024

@eVoloshchak, @anmurali Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@anmurali
Copy link

anmurali commented Jan 2, 2024

@eVoloshchak can you please review the proposals and comment (or pick)

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@eVoloshchak
Copy link
Contributor

@anmurali, this one can be closed I think.
The bug was resolved by #33525 and @rayane-djouah's proposal will be/is discussed on Slack

Copy link

melvin-bot bot commented Jan 7, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jan 7, 2024
Copy link

melvin-bot bot commented Jan 7, 2024

@eVoloshchak @anmurali 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!

Copy link

melvin-bot bot commented Jan 9, 2024

@eVoloshchak, @anmurali Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot removed the Overdue label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants