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

Update month data fields to be strings #2358

Conversation

futa-ikeda
Copy link
Contributor

@futa-ikeda futa-ikeda commented Oct 17, 2024

  • Ticket: [No ticket]
  • Feature flag: n/a

Purpose

  • Update institution-user date fields to be strings to avoid a bug where month data would be shown incorrectly

Summary of Changes

  • Don't use date transform for InstitutionUser model's monthLastLogin, monthLastActive, and accountCreationDate
    • Use of this transform was causing problems with the display of these fields as the API would return account_creation_date: "2024-10", but the date transform would convert that to 9/2024 depending on timezone
      (e.g. new Date('2024-10') // Mon Sep 30 2024 20:00:00 GMT-0400 (Eastern Daylight Time) {})

Screenshot(s)

  • Prevents this issue (Note the date in the API response and the date displayed in the table):
    image

Side Effects

QA Notes

  • Great find!

@futa-ikeda futa-ikeda merged commit 73268f9 into CenterForOpenScience:feature/insti-dash-improv Oct 18, 2024
9 checks passed
@futa-ikeda futa-ikeda deleted the update-user-dates branch October 18, 2024 20:19
Johnetordoff pushed a commit that referenced this pull request Oct 24, 2024
…ForOpenScience/ember-osf-web into add-fancy-pagination-buttons

* 'feature/insti-dash-improv' of https://github.com/CenterForOpenScience/ember-osf-web:
  [ENG-6246][ENG-6269][ENG-6275]  Add new property fields to mirage (#2353)
  [ENG-6368] Share summary graphs (#2361)
  Update month data fields to be strings (#2358)
  make total user count dynamic for the user tab

# Conflicts:
#	translations/en-us.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants