Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !1672

Fix time fields default to 8pm

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/Pezmc/bug-format-time-fields-as-time into master Jun 09, 2020
  • Overview 1
  • Commits 3
  • Pipelines 0
  • Changes 1

Created by: Pezmc

Fixes https://github.com/thoughtbot/administrate/issues/1671 Root cause explained on the issue: https://github.com/thoughtbot/administrate/issues/1671#issuecomment-641168322

For the same app as shown in that issue, the time fields now display and update as you'd expect:

image

image

You can check that out here: https://github.com/Pezmc/AdministrateTimeBug/tree/bugfix

Tests: Given this is effectively a front-end bug, and there are no Field::Time's in the example-app (and few tests against that app), I wasn't clear where to add test coverage. I could add a spec/administrate/views/fields/time/_form_spec.rb that asserts the value is formatted as HH:MM:SS, but it doesn't feel like that's asserting the right thing.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Pezmc/bug-format-time-fields-as-time