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

Avoid duplicate descriptions in calendars #2

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

philip-cline
Copy link

@philip-cline philip-cline commented Nov 21, 2023

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

The default description for a calendar in GTFS-lib will be autopopulated with a concatenation of the days of service it operates on. However, if multiple calendars operate on the same set of days, this will create duplicate descriptions which can become an issue for the datatools-ui display. This PR conditionally overrides any duplicates with the service-id, which is at least more useful than displaying duplicates.

You can test this with datatools-server set up to use this gtfs-lib hash and the latest datatools-ui.

Copy link

@br648 br648 left a comment

Choose a reason for hiding this comment

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

Works for me. I think dev needs to be merged into this PR? I built and tested gtfs-lib locally (by merging dev into this PR!). The remaining days of the week descriptions now look out of place, but I guess this doesn't matter. Make's we wonder why we even need a description!

@br648 br648 assigned philip-cline and unassigned br648 Nov 22, 2023
Copy link

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

Working

@philip-cline philip-cline merged commit c35159f into dev Nov 23, 2023
2 checks passed
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.

3 participants