Project

General

Profile

Bug #28737

When creating a new OS, I can not assign provisioning templates

Added by Marek Hulán 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

A regression introduced in #22269


Related issues

Related to Foreman - Bug #22269: Operating system templates are ordered inconsistently in UI.Closed

Associated revisions

Revision 129eae8a (diff)
Added by Marek Hulán 7 months ago

Fixes #28737 - fix template assignment in OS form

This fixes a regression introduced in #22269 when we started to sort
template kinds in OS form. It relied on sorting fields using database,
but for newly created OS, we build new objects in memory only, based on
which we generate the form.

This now checks if there's at least one unsaved OsDefaultTemplate object
in collection proxy and if it is, we sort template kinds in Ruby. If all
objects are persisted, we can improve efficiency by relying on SQL as we
did before.

History

#1 Updated by Marek Hulán 7 months ago

  • Related to Bug #22269: Operating system templates are ordered inconsistently in UI. added

#2 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7352 added

#3 Updated by The Foreman Bot 7 months ago

  • Fixed in Releases 2.0.0 added

#4 Updated by Marek Hulán 7 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Tomer Brisker 6 months ago

  • Category set to Templates

Also available in: Atom PDF