[TikiWiki-commits] [Git][tikiwiki/tiki][28.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 <68f0b9fe2a0a7_2ca8e9e058773@gitlab-sidekiq-low-urgency-cpu-bound-v2-56f86b7d78-f5gns.mail>

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


Commits:
d7f587b9 by Victor Emanouilov at 2025-10-16T12:25:13+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/d7f587b90b2fa9db523a52ef5d4febe10a84d6e9

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