[TikiWiki-commits] [Git][tikiwiki/tiki][26.x] [FIX] tabular sync: invalidate object and update index queue when back-filling...

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68f0ba12f07da_2c1553a4c3535d@gitlab-sidekiq-low-urgency-cpu-bound-v2-56f86b7d78-s75gv.mail>

Victor Emanouilov pushed to branch 26.x at Tiki Wiki CMS Groupware / Tiki


Commits:
1b55149a by Victor Emanouilov at 2025-10-16T12:25:33+03:00
[FIX] tabular sync: invalidate object and update index queue when back-filling the primary key of a tracker item (useful when relations and other fields depend on the index value but the indexed item still uses the old value)

- - - - -


1 changed file:

- lib/core/Tracker/Tabular/Source/TrackerSourceEntry.php


Changes:

=====================================
lib/core/Tracker/Tabular/Source/TrackerSourceEntry.php
=====================================
@@ -45,6 +45,14 @@ class TrackerSourceEntry implements SourceEntryInterface
 
     public function backfillPK($pk, $value)
     {
+        global $prefs;
+
         \TikiLib::lib('trk')->modify_field($this->data['itemId'], $pk, $value);
+
+        if ($prefs['feature_search'] === 'y' && $prefs['unified_incremental_update'] === 'y') {
+            $unifiedsearchlib = TikiLib::lib('unifiedsearch');
+            $unifiedsearchlib->invalidateObject('trackeritem', $this->data['itemId']);
+            $unifiedsearchlib->processUpdateQueue();
+        }
     }
 }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1b55149ac9d988108eec3b0d9aba56c7ef1979e5

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