Skip to content

[#72873] Template drop-down is not showing if user starts meeting creation from global meeting index #22500

Merged
mrmir merged 3 commits intorelease/17.3from
bug/72873-template-drop-down-is-not-showing-if-user-starts-meeting-creation-from-global-meeting-index
Mar 27, 2026
Merged

[#72873] Template drop-down is not showing if user starts meeting creation from global meeting index #22500
mrmir merged 3 commits intorelease/17.3from
bug/72873-template-drop-down-is-not-showing-if-user-starts-meeting-creation-from-global-meeting-index

Conversation

@mrmir
Copy link
Copy Markdown
Contributor

@mrmir mrmir commented Mar 25, 2026

Ticket

https://community.openproject.org/work_packages/72873

What approach did you choose and why?

  • Show the template selector from the global create form when the user can access at least one template
  • The template selector is refreshed based on the project selected
  • templates_visible_globally is the new method that enables this check, and is similar to templates_visible_in_project, but for all projects that a user has permissions for
  • Instead of showing/hiding the template selector depending on the project selected, it is instead enabled/disabled to prevent the dialog from changing sizes

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@mrmir mrmir force-pushed the bug/72873-template-drop-down-is-not-showing-if-user-starts-meeting-creation-from-global-meeting-index branch from 596e22e to 0c4f195 Compare March 26, 2026 08:07
@mrmir mrmir marked this pull request as ready for review March 26, 2026 10:13
@github-actions

This comment was marked as resolved.

@mrmir mrmir changed the base branch from dev to release/17.3 March 26, 2026 10:17
Copy link
Copy Markdown
Member

@oliverguenther oliverguenther left a comment

Choose a reason for hiding this comment

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

I get an internal error when:

  1. Open global create dialog
  2. Fill in project that has template
  3. Fill in template
  4. Leave title empty

Click save.

The stack trace is

F, [2026-03-26T16:06:30.635866 #41665] FATAL -- : [fab9c796-4024-4c45-9609-944fe9d4c515]
[fab9c796-4024-4c45-9609-944fe9d4c515] NoMethodError (undefined method 'id' for nil):
[fab9c796-4024-4c45-9609-944fe9d4c515]
[fab9c796-4024-4c45-9609-944fe9d4c515] modules/meeting/app/models/meeting.rb:154:in 'Meeting.templates_visible_in_project'
[fab9c796-4024-4c45-9609-944fe9d4c515] modules/meeting/app/controllers/meetings_controller.rb:597:in 'MeetingsController#find_copy_from_meeting'

It seems that this is called with a @project nil value in the error case. Rest of the behavior LGTM.

@mrmir mrmir requested a review from oliverguenther March 27, 2026 07:50
@mrmir mrmir merged commit 1441d51 into release/17.3 Mar 27, 2026
17 of 20 checks passed
@mrmir mrmir deleted the bug/72873-template-drop-down-is-not-showing-if-user-starts-meeting-creation-from-global-meeting-index branch March 27, 2026 08:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants