From bb452f20d67dbc71228d7505536a398d95e6c290 Mon Sep 17 00:00:00 2001 From: v-dumas Date: Tue, 9 Dec 2025 13:53:35 +0100 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B04032=20-=20On=20UserRequest,=20servi?= =?UTF-8?q?ce=20subcategory=20no=20more=20limited=20by=20request=5Ftype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datamodel.itop-request-mgmt.xml | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml index 263fadfec1..cfe37bb360 100755 --- a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml +++ b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml @@ -306,7 +306,7 @@ true - service_id AND (ISNULL(:this->request_type) OR request_type = :this->request_type) AND status != 'obsolete']]> + service_id AND status != 'obsolete']]> @@ -1334,19 +1334,21 @@ // Compute the priority of the ticket $this->Set('priority', $this->ComputePriority()); - // Compute the request_type if not already defined (by the user) - $sType = $this->Get('request_type'); - if (is_null($sType) || ($sType === '')) + return parent::ComputeValues(); + }]]> + + + false + public + EventListener + Get('servicesubcategory_id'); + if ($iSvcSubcat != 0) { - $iSvcSubcat = $this->Get('servicesubcategory_id'); - if ($iSvcSubcat != 0) - { - $oSvcSubcat = MetaModel::GetObject(ServiceSubcategory::class, $iSvcSubcat, true, true); - $this->Set('request_type', $oSvcSubcat->Get('request_type')); - } + $oSvcSubcat = MetaModel::GetObject(ServiceSubcategory::class, $iSvcSubcat, true, true); + $this->Set('request_type', $oSvcSubcat->Get('request_type')); } - - return parent::ComputeValues(); }]]> @@ -1528,6 +1530,13 @@ }]]> + + + EVENT_DB_BEFORE_WRITE + EvtComputeRequestType + 0 + +
From 046d34445ba09b96d91767e4ab707d9a49d4c1e2 Mon Sep 17 00:00:00 2001 From: v-dumas Date: Wed, 10 Dec 2025 11:24:48 +0100 Subject: [PATCH 2/2] =?UTF-8?q?N=C2=B04032=20-=20Remove=20the=20servicesub?= =?UTF-8?q?category=5Fid=20dependency=20on=20request=5Ftype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml index cfe37bb360..8bda8690ef 100755 --- a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml +++ b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml @@ -309,7 +309,6 @@ service_id AND status != 'obsolete']]> - servicesubcategory_id ServiceSubcategory