Bug #2016711: Long-text columns missing from grouped search dropdown

Also improved the explanatory text.
This commit is contained in:
Charles Haley 2023-04-18 12:57:03 +01:00
parent 165f5a93da
commit 11d0994878

View File

@ -55,26 +55,28 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
"grouped search term in the drop-down box, enter the list of columns "
"to search in the value box, then push the Save button. "
"<p>Note: Search terms are forced to lower case; <code>MySearch</code> "
"and <code>mysearch</code> are the same term."
"<p>You can have your grouped search term show up as User categories in "
" the Tag browser. Just add the grouped search term names to the Make User "
"categories from box. You can add multiple terms separated by commas. "
"The new User category will be automatically "
"populated with all the items in the categories included in the grouped "
"search term. <p>Automatic User categories permit you to see easily "
"all the category items that "
"and <code>mysearch</code> are the same term. Search terms cannot be "
"hierarchical. Periods are not allowed in the term name."
"<p>Grouped search terms can show as User categories in the Tag browser "
"by adding the grouped search term names to the 'Make User "
"categories from' box. Multiple terms are separated by commas. "
"These 'automatic user categories' will be populated with items "
"from the categories included in the grouped search term. "
"<p>Automatic user categories permit you to see all the category items that "
"are in the columns contained in the grouped search term. Using the above "
"<code>allseries</code> example, the automatically-generated User category "
"will contain all the series mentioned in <code>series</code>, "
"<code>allseries</code> example, the automatic user category "
"will contain all the series names in <code>series</code>, "
"<code>#myseries</code>, and <code>#myseries2</code>. This "
"can be useful to check for duplicates, to find which column contains "
"a particular item, or to have hierarchical categories (categories "
"that contain categories)."))
"that contain categories). "
"<p>Note: values from non-category columns such as comments won't appear "
"in automatic user categories. "))
self.gst = db.prefs.get('grouped_search_terms', {}).copy()
self.orig_gst_keys = list(self.gst.keys())
fm = db.new_api.field_metadata
categories = [x[0] for x in find_categories(fm) if fm[x[0]]['search_terms']]
categories = [x for x in fm.keys() if not x.startswith('@') and fm[x]['search_terms']]
self.gst_value.update_items_cache(categories)
QTimer.singleShot(0, self.fill_gst_box)