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

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


Commits:
79ca6117 by Victor Emanouilov at 2025-10-16T12:25:06+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/79ca61178d1c7e061fa80452603a6ec93a139e20

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