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

[Editor]: Bug - Update frequency not kept #1041

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

cmoinier
Copy link
Collaborator

@cmoinier cmoinier commented Nov 15, 2024

Description

This PR fixes the behavior of the updated frequency dropdown, which did not keep the value "2 times per day" upon save & refresh.

The bug only concerned the value "2 times per day", and was due to the fact that in the ISO reader, the mapper for getUpdateFrequencyFromCustomPeriod was always going to the case days <= 7, even for cases that had 0 days, such as the case "2 times per day", which has the value 0 days and 12 hours.

Also, in the hours case, the udpatedTimes value was calculated based on the days count, which is also wrong in this case and should divide the 24 hours with the hours count.

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Affected libs: api-metadata-converter, api-repository, feature-catalog, feature-record, feature-router, feature-editor, feature-search, feature-map, feature-dataviz, feature-auth, ui-search,
Affected apps: metadata-converter, metadata-editor, datahub, demo, webcomponents, search, map-viewer, datafeeder,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Nov 15, 2024

📷 Screenshots are here!

@coveralls
Copy link

Coverage Status

coverage: 84.24% (+1.0%) from 83.209%
when pulling 9db51f0 on ME-frequency-not-kept-bug
into 89e0d3b on main.

Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

Thanks @cmoinier for fixing this bug! 🌮

I quickly tested it and it works. The code looks also good to me. 🚀

@cmoinier cmoinier merged commit 68624e7 into main Nov 18, 2024
13 checks passed
@cmoinier cmoinier deleted the ME-frequency-not-kept-bug branch November 18, 2024 10:33
Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

well done!! 🎉

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.

4 participants