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

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6942f3c646cfd_2a17fa5c625c4@gitlab-sidekiq-low-urgency-cpu-bound-v2-85679c65b9-lcwxb.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
d5a9a660 by Merci Jacob at 2025-12-17T18:09:31+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

- - - - -


1 changed file:

- lib/wiki-plugins/wikiplugin_trackerfilter.php


Changes:

=====================================
lib/wiki-plugins/wikiplugin_trackerfilter.php
=====================================
@@ -933,6 +933,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/d5a9a6608c72953127aeca85361a0ffce7f0dc5a

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d5a9a6608c72953127aeca85361a0ffce7f0dc5a
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.