Commit Graph
2 Commits
Author SHA1 Message Date
Lauri Ojansivu 94b59bef01 Move date format controls to global, board and member settings
Apply enabled member overrides before board and global defaults. Show inherited
status and saved formats using existing translations, and keep the card section
named Date. Cover rendering, exports, permissions, date-only formats and settings
isolation.

Thanks to xet7.
2026-09-23 13:58:24 +03:00
Lauri Ojansivu 0c538bb924 Fix "No such function: isDateFormat" and 11 siblings breaking the card popup.
Reported directly: clicking a minicard did not open the card popup, with
the browser console showing "Error: No such function: isDateFormat" from
Template.cardFieldSectionDates. cardDetails.jade was split into several
per-section templates (cardFieldSectionLabels/Dates/Members/
DependenciesAndSort/CustomFields/VoteAndPoker), plus cardDetailsActionsPopup
and activities.jade are separate templates entirely - but twelve helpers
those templates actually call (isDateFormat, canShowCustomFieldsOnCard,
stickers, isWatching, dueDateChangeCount, getLocations, getDependencyCards,
customFieldsGrid, showActivities, showVotingButtons,
showPlanningPokerButtons, currentSwimlaneListsSorted, isCurrentListId) were
only ever registered on Template.cardDetails.helpers - template-local, so
invisible to every template that isn't cardDetails itself. Blaze only
surfaces this the moment that piece of UI actually renders (an
autorun/Tracker throw, not a build error), which is why it passed the
Node test suite and even a `meteor build` cleanly and only broke live.

Moved all twelve to Template.registerHelper (global), matching the
pattern the file already uses for isSectionOpen (this file) and
canModifyCard (client/config/blazeHelpers.js) - both deliberately global
for the same reason. The remaining Template.cardDetails.helpers entries
(orderedCardFieldSections, cardMaximized, cardCollapsed, presentParentTask,
linkForCard, isVerticalScrollbars, isLoaded) are confirmed used only from
cardDetails.jade itself, so they stay template-local.

tests/cardFieldSectionHelperScope.test.cjs pins all twelve as globally
registered and confirms none are shadowed by a stale local copy.
tests/recentIssueRegressions.test.cjs's currentSwimlaneListsSorted
extraction updated for the new registerHelper shape (behavior unchanged).

Verified against a real Meteor boot (`meteor run`) in-sandbox.

Thanks to xet7 !
2026-09-11 00:00:02 +03:00