[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][FIX] PluginList: display format="trackerrender" does not show custom...

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <688d214d2b366_2cd5f985383c@gitlab-sidekiq-low-urgency-cpu-bound-v2-655597b6c5-6hzcg.mail>

ushindi bienvenu pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
86373741 by ushindi bienvenu at 2025-08-01T20:12:14+00:00
[BP][FIX] PluginList: display format="trackerrender" does not show custom...
---
* [BP][FIX] PluginList: display format="trackerrender" does not show custom status but the default ones
---
* [FIX] PluginList: display format="trackerrender" does not show custom status but the default ones
---
* [FIX] PluginList: display format="trackerrender" does not show custom status but the default ones

See merge request tikiwiki/tiki!8093

See merge request tikiwiki/tiki!8161

See merge request tikiwiki/tiki!8162

- - - - -


1 changed file:

- lib/core/Search/Formatter/ValueFormatter/Trackerrender.php


Changes:

=====================================
lib/core/Search/Formatter/ValueFormatter/Trackerrender.php
=====================================
@@ -36,26 +36,27 @@ class Search_Formatter_ValueFormatter_Trackerrender extends Search_Formatter_Val
     public function render($name, $value, array $entry)
     {
         if ($name === 'tracker_status') {
+            $options  = TikiLib::lib('trk')->get_tracker_options($entry['tracker_id']);
             switch ($value) {
                 case 'o':
                     $status = 'open';
-                    $istatus = tra('Open');
+                    $istatus = $options['altOpenStatus'] ?: tra('Open');
                     break;
                 case 'p':
                     $status = 'pending';
-                    $istatus = tra('Pending');
+                    $istatus = $options['altPendingStatus'] ?: tra('Pending');
                     break;
                 default:
                 case 'c':
                     $status = 'closed';
-                    $istatus = tra('Closed');
+                    $istatus = $options['altClosedStatus'] ?: tra('Closed');
                     break;
             }
 
             $smarty = TikiLib::lib('smarty');
             return smarty_function_icon(['name' => 'status-' . $status, 'iclass' => 'tips', 'ititle' => ':'
                 . $istatus ], $smarty->getEmptyInternalTemplate());
-        } elseif (substr($name, 0, 14) !== 'tracker_field_' && $name !== 'title') {
+        } elseif (! str_starts_with($name, 'tracker_field_') && $name !== 'title') {
             return $value;
         }
 



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/86373741f79d2174dc7da3139bfa7330600090e9

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