-
Bug
-
Resolution: Fixed
-
Medium
-
9.1.0, 9.0.1, 9.0.3, 9.1.1, 9.2.0, 9.2.1, 9.3.1, 9.2.3, 9.2.5, 9.2.6, 9.5.1
-
14
-
Severity 3 - Minor
-
60
-
Issue Summary
This is reproducible on Data Center: Yes
When using Dark or Light Themes and changing the Event Color in Team Calendars, the Event Icon does not change color as it should. The Event color-code used to help identify events in the calendar.
Steps to Reproduce
- Set to use Dark or Light Theme
- Create a new Calendar
- Add an Event to the Calendar
- Change the Event color in the three-doted menu next to the Event icon
Expected Results
The event background in the calendar and the event icon in the event list side panel change color.

Actual Results
The event background in the calendar changes color and the event icon in the event list side panel remains unchanged.


Workaround
How to apply the script:
- As a Confluence admin Go to Confluence Administration > Under Look and Feel > Custom HTML
- Click Edit > Paste the script under At end of the HEAD and then Save
- Go back to the page with the Calendar. Check the legend icon colors, they should now match with the events.
- Make sure to test all event types and also add custom events and try.
Disclaimer
- This script is officially not supported and its purely based on Best effort basis.
- We recommend to first try this in test environment and then proceed with production.
<script> // Wait for the DOM to load before running the script document.addEventListener('DOMContentLoaded', function() { // Ensure jQuery is available (supports window.jQuery, window.$, or AJS.$) var $ = window.jQuery || window.$ || AJS.$; if (!$) return; // Function to sync legend icon colors with event bar colors function syncLegendColors() { // Loop through each legend item $('li.child-subcalendar').each(function() { var legendItem = $(this); var subCalendarId = legendItem.attr('data-sub-calendar-id'); var eventBar; // Try to match the legend item to an event bar using data-subcalendar-id if (subCalendarId) { eventBar = $('.fc-event[data-subcalendar-id="' + subCalendarId + '"]'); } // If no match found, fall back to class-based matching if (!eventBar || !eventBar.length) { var legendType; // Handle custom event types using their unique class if (legendItem.attr('data-custom-event-type-id')) { legendType = legendItem.attr('class').split(' ').find(cls => cls !== 'child-subcalendar' && !cls.startsWith('subcalendar-') ); } else { // Handle default event types (Events, Leave, Travel, Birthdays) if (legendItem.hasClass('other')) legendType = 'other'; else if (legendItem.hasClass('leaves')) legendType = 'leaves'; else if (legendItem.hasClass('travel')) legendType = 'travel'; else if (legendItem.hasClass('birthdays')) legendType = 'birthdays'; } // Find the event bar using the identified class if (legendType) { eventBar = $('.fc-event.' + legendType); } } // If a matching event bar is found, apply its background color to the legend icon if (eventBar && eventBar.length) { var eventColor = eventBar.css('background-color'); if (eventColor) { legendItem.find('.subcalendar-icon-container svg path').css('fill', eventColor); } } }); } // Run the sync 10 seconds after page load to ensure the calendar is rendered setTimeout(syncLegendColors, 10000); // Periodically re-sync every 15 seconds to handle color changes setInterval(syncLegendColors, 15000); // Observe DOM changes in the calendar to re-sync dynamically var calendarContainer = document.querySelector('.fc-event-container') || document.body; var observer = new MutationObserver(function() { syncLegendColors(); }); observer.observe(calendarContainer, { childList: true, subtree: true }); }); </script>
- resolves
-
CONFSERVER-100159 Hovering over the different Event Types in Team Calendars does not show the "..." (more) menu
-
- Closed
-