From 503df018aab77e7664ebab9196b401f16e77bb5c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Nov 2025 14:58:43 +0300 Subject: [PATCH] 172 instance_operation_ls paging bug fix --- v1/Application.cfc | 2 +- v1/lib/filter_build.cfm | 18 +++++++- v1/lib/rest_api_helper.cfc | 15 ++++-- v1/resources/instance_operation_ls.cfc | 63 ++++++++++++++++---------- 4 files changed, 68 insertions(+), 30 deletions(-) diff --git a/v1/Application.cfc b/v1/Application.cfc index d3d0fff..6ee8077 100644 --- a/v1/Application.cfc +++ b/v1/Application.cfc @@ -51,7 +51,7 @@ //variables.framework.docs={}; variables.framework.docs.APIName="svc-api"; - variables.framework.docs.APIVersion="0.171"; /*$ git config --global --unset user.password*/ + variables.framework.docs.APIVersion="0.172"; /*$ git config --global --unset user.password*/ variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; diff --git a/v1/lib/filter_build.cfm b/v1/lib/filter_build.cfm index e51ad76..2fa7744 100644 --- a/v1/lib/filter_build.cfm +++ b/v1/lib/filter_build.cfm @@ -1,6 +1,7 @@ + @@ -23,8 +24,21 @@ --->#fltr.field# = <> <= < >= > LIKE LIKE IN () = #fltr.field# - + --->#fltr.field# + = <> <= < >= > LIKE ILIKE LIKE ILIKE IN () = #fltr.field# + diff --git a/v1/lib/rest_api_helper.cfc b/v1/lib/rest_api_helper.cfc index 0aa75c7..a909b6a 100644 --- a/v1/lib/rest_api_helper.cfc +++ b/v1/lib/rest_api_helper.cfc @@ -4,6 +4,7 @@ hint="Static helper methods for ReST API"> + - + + + @@ -98,11 +101,17 @@ + + + + + + - + - + diff --git a/v1/resources/instance_operation_ls.cfc b/v1/resources/instance_operation_ls.cfc index cefbd69..1bbd847 100644 --- a/v1/resources/instance_operation_ls.cfc +++ b/v1/resources/instance_operation_ls.cfc @@ -12,7 +12,11 @@ "dt_created"={prefix="o", type="date"}, "dt_updated"={prefix="o", type="date"}, "creator_id"={prefix="o", type="integer"}, + "creator_email"={prefix="c", column="email", type="string"}, + "creator_shortname"={prefix="c", column="shortname", type="string"}, "updater_id"={prefix="o", type="integer"}, + "updater_email"={prefix="u", column="email", type="string"}, + "updater_shortname"={prefix="u", column="shortname", type="string"}, "dt_submit"={prefix="o", type="date"}, "submit_result"={prefix="o", type="string"}, "dt_start"={prefix="o", type="date"}, @@ -34,8 +38,9 @@ + - + @@ -53,12 +58,7 @@ - - - - - - + select @@ -89,50 +89,65 @@ u.email as updater_email u.shortname as updater_shortname - from instance_operation o - join instance e on (o.instance_uid=e.instance_uid) - left outer join specification_item i on (e.specification_item_id=i.specification_item_id) - left outer join specification s on (i.specification_id=s.specification_id) - left outer join contract d on (s.contract_id=d.contract_id) - left outer join svc v on (e.service_id=v.svc_id) - left outer join usr c on (e.creator_id=c.usr_id) - left outer join usr u on (e.updater_id=u.usr_id) + + from instance_operation o + join instance e on (o.instance_uid=e.instance_uid) + left outer join specification_item i on (e.specification_item_id=i.specification_item_id) + left outer join specification s on (i.specification_id=s.specification_id) + left outer join contract d on (s.contract_id=d.contract_id) + left outer join svc v on (e.service_id=v.svc_id) + left outer join usr c on (e.creator_id=c.usr_id) + left outer join usr u on (e.updater_id=u.usr_id) + #local.fromClause# where s.specification_id= order by - limit #maxrows# + + limit #arguments.pageSize# + offset #arguments.pageSize*(arguments.page-1)# + - + + + select count(*) as cnt + #local.fromClause# + where + s.specification_id= + + select count(*) as cnt - from instance_operation o + #local.fromClause# + where s.specification_id= + + - + - + - + - - + +