[TikiWiki-commits] [Git][tikiwiki/tiki][24.x] [FIX] Plugin TrackerFilter: allow usage of 'usergroups' field as a filter

"Merci Jacob \(@mercihabam\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <694519f48af46_2a3a81a443384d@gitlab-sidekiq-low-urgency-cpu-bound-v2-647dd7658c-j5cl4.mail>

Merci Jacob pushed to branch 24.x at Tiki Wiki CMS Groupware / Tiki


Commits:
8785561b by Merci Jacob at 2025-12-19T09:25:05+00:00
[FIX] Plugin TrackerFilter: allow usage of 'usergroups' field as a filter
---
* [FIX] Plugin TrackerFilter: allow usage of 'usergroups' field as a filter

See merge request tikiwiki/tiki!9235


(cherry picked from commit d5a9a6608c72953127aeca85361a0ffce7f0dc5a)

0cf4019f [FIX] Plugin TrackerFilter: allow usage of 'usergroups' field as a filter

Co-authored-by: Merci Jacob <[email protected]>
- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_trackerfilter.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_trackerfilter.php
=====================================
@@ -925,6 +925,20 @@ function wikiplugin_trackerFilter_get_filters($trackerId = 0, array $listfields
                         ];
                     }
 
+                    break;
+                case 'usergroups':
+                    $groups = TikiLib::lib('user')->list_all_groups();
+                    foreach ($groups as $group) {
+                        $opt['id'] = $group;
+                        $opt['name'] = $group;
+                        if (! empty($_REQUEST['f_' . $fieldId]) && ((! is_array($_REQUEST['f_' . $fieldId]) && $_REQUEST['f_' . $fieldId] == $group) || (is_array($_REQUEST['f_' . $fieldId]) && in_array($group, $_REQUEST['f_' . $fieldId])))) {
+                            $opt['selected'] = 'y';
+                            $selected = true;
+                        } else {
+                            $opt['selected'] = 'n';
+                        }
+                        $opts[] = $opt;
+                    }
                     break;
                 default:
                     return tra('tracker field type not processed yet') . ' ' . $field['type'];



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8785561bfa6168e1b45d26523178441988e6a0a4

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8785561bfa6168e1b45d26523178441988e6a0a4
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.