From 9036454cf2ad834f56cc8fe8d458baecb0781527 Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Sun, 24 Nov 2024 11:34:30 +0000 Subject: [PATCH] Update list limits for alert profiles dropdowns For some long-forgotten reason, there limits configured on the length of dropdown lists in Alert Profiles: One value per match field is set in the database. The limits are set to 1000 for all fields, but some users do in fact have more than 1000 communication rooms registered in their NAV installations. The code does not allow unlimited lengths, so a quickfix for now is to increase the limit ten-fold. A more long-term fix would be to look into why there are limitations at all (aside from the fact that selecting from a dropdown with > 1000 values and no search functionality is bad UX) --- python/nav/models/sql/changes/sc.05.12.0100.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 python/nav/models/sql/changes/sc.05.12.0100.sql diff --git a/python/nav/models/sql/changes/sc.05.12.0100.sql b/python/nav/models/sql/changes/sc.05.12.0100.sql new file mode 100644 index 0000000000..608c73ceda --- /dev/null +++ b/python/nav/models/sql/changes/sc.05.12.0100.sql @@ -0,0 +1,5 @@ +-- Increase alertprofiles dropdown list limits +UPDATE matchfield +SET list_limit = 10000 +WHERE show_list + AND list_limit = 1000;