[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Add bidirectional sync option for Tracker Wiki Page field

"SoftStart Code \(@softstartcode\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68b8dd2cdb456_2cdd180603ee@gitlab-sidekiq-low-urgency-cpu-bound-v2-56cccf89b5-cmc7d.mail>

SoftStart Code pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
e58e7eec by Sandeep D at 2025-09-04T00:20:30+00:00
[ENH] Add bidirectional sync option for Tracker Wiki Page field
---
* [ENH] Add bidirectional sync option for Tracker Wiki Page field

This merge request introduces an optional setting for the Wiki Page tracker field type that enables bidirectional synchronization between the tracker field value and the associated wiki page name.

See merge request tikiwiki/tiki!8466

- - - - -


2 changed files:

- lib/core/Tracker/Field/Wiki.php
- lib/trackers/trackerlib.php


Changes:

=====================================
lib/core/Tracker/Field/Wiki.php
=====================================
@@ -213,7 +213,7 @@ class Tracker_Field_Wiki extends Tracker_Field_Text implements \Tracker\Field\Ex
         $page_name = $this->getValue();
         $insForPagenameField = 'ins_' . $this->getOption('fieldIdForPagename');
 
-        if (! $page_name) {
+        if (! $page_name || (isset($requestData['action']) && $requestData['action'] === 'clone_item')) {
             if (! empty($requestData[$insForPagenameField])) {
                 $page_name = $requestData[$insForPagenameField];    // from tabular import replace
                 $itemId = isset($requestData['itemId']) ? $requestData['itemId'] : 0;


=====================================
lib/trackers/trackerlib.php
=====================================
@@ -4842,7 +4842,7 @@ class TrackerLib extends TikiLib
                     } elseif (! $wikilib->get_namespace($value) && $value != $wikilib->get_without_namespace($new)) {
                         $this->modify_field($itemId, $fieldId, $wikilib->get_without_namespace($new));
                     }
-                    if ($nameFieldId) {
+                    if ($nameFieldId && isset($field['options_map']['syncWikiPageNameWithTrackerField']) && $field['options_map']['syncWikiPageNameWithTrackerField'] == 'y') {
                         $this->modify_field($itemId, $nameFieldId, $wikilib->get_without_namespace($new));
                     }
                 }



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

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