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

Bugfix- birth year selction on profile edit page #11337

Conversation

haldaranup
Copy link
Contributor

Summary

After selecting birth year the value gets mismatched because of incorrect label. This is because of timezone, when localized in any timezone that is less than UTC, ex- new Date('2023') the date will be shown 2022 instead of 2023

Screenshot from 2023-09-23 01-03-16(1)

So, instead of passing year directly to $fomatDate('2023'), setting full year to it so there is no effect of timezone

Screenshot from 2023-09-29 13-15-44

References

Fixes #11292

Reviewer guidance

  • Go to profile edit page
  • Try to change the birth year
  • After saving check if the year is showing correctly


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@rtibbles rtibbles changed the base branch from develop to release-v0.16.x September 29, 2023 20:34
@rtibbles
Copy link
Member

Hi @haldaranup - thanks, this definitely looks like the right fix!

I think we would like to include this in our upcoming release, so if I could ask you to rebase this PR onto release-v0.16.x that would be great.

To do this, I would suggest the following workflow:

  • Make sure you have local versions of the Learning Equality develop branch and the Learning Equality release-v0.16.x branch and that they are both up to date - for the sake of the following, I will assume they are called develop and release-v0.16.x respectively.
  • Locally, checkout your feature branch
  • Run this rebase command: git rebase --onto release-v0.16.x develop this will rebase your current branch (your feature branch) onto release-v0.16.x, removing any commits that are already present in develop - so, if everything works as expected, it should keep your commit bugfix- birth year selction
  • Once you have done that, you will need to force push to update your remote branch git push --force - if the remote branch is not set, then git should give you hints about how to push to the correct remote branch.

@haldaranup haldaranup force-pushed the bugfix-birth-year-selction branch from 15ce825 to 595ff11 Compare September 30, 2023 02:39
@haldaranup
Copy link
Contributor Author

Hi @haldaranup - thanks, this definitely looks like the right fix!

I think we would like to include this in our upcoming release, so if I could ask you to rebase this PR onto release-v0.16.x that would be great.

To do this, I would suggest the following workflow:

  • Make sure you have local versions of the Learning Equality develop branch and the Learning Equality release-v0.16.x branch and that they are both up to date - for the sake of the following, I will assume they are called develop and release-v0.16.x respectively.
  • Locally, checkout your feature branch
  • Run this rebase command: git rebase --onto release-v0.16.x develop this will rebase your current branch (your feature branch) onto release-v0.16.x, removing any commits that are already present in develop - so, if everything works as expected, it should keep your commit bugfix- birth year selction
  • Once you have done that, you will need to force push to update your remote branch git push --force - if the remote branch is not set, then git should give you hints about how to push to the correct remote branch.

Thanks @rtibbles, I have done the steps mentioned above. Please let me know if any other changes are required or if anything is done incorrectly

@rtibbles
Copy link
Member

rtibbles commented Sep 30, 2023

Looks right to me, thank you! We will do a full review on Monday.

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Code looks good and manual testing checks out - the value of the component and the label match! Could you fix the line length for your comments, so we can merge?

@pcenov
Copy link
Member

pcenov commented Oct 3, 2023

LGTM as well, no issues observed while manually testing.

@rtibbles
Copy link
Member

rtibbles commented Oct 3, 2023

Thank you for your contribution @haldaranup!

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.

Profile edit page shows incorrect label for birth year
3 participants