[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [FIX] API and tracker item save: ability to skip validation when API has...

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

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


Commits:
1a76ac90 by Victor Emanouilov at 2025-10-02T12:56:35+03:00
[FIX] API and tracker item save: ability to skip validation when API has nothing to do with mandatory fields, for example

- - - - -


1 changed file:

- lib/core/Services/Tracker/Controller.php


Changes:

=====================================
lib/core/Services/Tracker/Controller.php
=====================================
@@ -1092,13 +1092,20 @@ class Services_Tracker_Controller
 
             $deletedFiles = $itemObject->deletedFiles($input);
 
+            if (TIKI_API) {
+                $validate = ! $input->skipValidation->bool();
+            } else {
+                $validate = true;
+            }
+
             $itemId = $this->utilities->insertItem(
                 $definition,
                 [
                     'status' => $input->status->word(),
                     'fields' => $fields,
                     'processedFields' => $processedFields,
-                    'deletedFiles' => $deletedFiles
+                    'deletedFiles' => $deletedFiles,
+                    'validate' => $validate,
                 ]
             );
 
@@ -1360,6 +1367,12 @@ class Services_Tracker_Controller
 
             $deletedFiles = $itemObject->deletedFiles($input);
 
+            if (TIKI_API) {
+                $validate = ! $input->skipValidation->bool();
+            } else {
+                $validate = true;
+            }
+
             $result = $this->utilities->updateItem(
                 $definition,
                 [
@@ -1367,7 +1380,8 @@ class Services_Tracker_Controller
                     'status' => $input->status->word(),
                     'fields' => $fields,
                     'processedFields' => $processedFields,
-                    'deletedFiles' => $deletedFiles
+                    'deletedFiles' => $deletedFiles,
+                    'validate' => $validate,
                 ]
             );
 



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

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