Skip to content

Load whats new tab when no items present

Serhii Yarynovskyi requested to merge 393282-fix-whats-new-for-empty-array into master

What does this MR do and why?

After updating our GitLab to 15.8 (and same when upgrading to 15.9) the help icon showed the dot in the top-right corner stating there is something in the "What's new".

When opening the user menu it shows a 0 value behind "What's New". Clicking on it leads to loading indefinitely.

Fixing this bug

Screenshots or screen recordings

before after
Screenshot_2023-05-22_at_14.34.40 Screenshot_2023-05-22_at_14.32.06

How to set up and validate locally

  • Login as admin. Go to /admin/application_settings/preferences.
  • In What’s new section select Current tier only.
  • Open browser console and remove display-whats-new-notification key from local storage if present.

bin/rails c

ReleaseHighlight.current_package
  • Open last file under /data/whats_new/*.yml
  • Change available_in: [...] for all the records to tier different than returned from console.
  • For example if rails console returned Free, change to available_in: [Ultimate].
  • If rails console returned Ultimate, change to available_in: [Premium] etc.

gdk redis-cli

FLUSHALL
  • Restart rails. Login as any user. Open question mark icon in the header.
  • Open What's new tab. Make sure it shows records from /data/whats_new/*.yml older file.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #393282 (closed)

Edited by Serhii Yarynovskyi

Merge request reports