Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
43aea1be
Commit
43aea1be
authored
5 years ago
by
Johannes Hörmann
Browse files
Options
Downloads
Patches
Plain Diff
fix support ticket behaviour if status whitelist is empty
parent
d111e196
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js
+12
-5
12 additions, 5 deletions
...ywordEntry_entity/recordcontainers/db/conditionProcess.js
process/Ticket_lib/process.js
+3
-3
3 additions, 3 deletions
process/Ticket_lib/process.js
with
15 additions
and
8 deletions
entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js
+
12
−
5
View file @
43aea1be
...
...
@@ -3,18 +3,25 @@ import("system.db");
import
(
"
system.result
"
);
import
(
"
Sql_lib
"
);
var
cond
=
SqlCondition
.
begin
().
andPrepareVars
(
"
AB_KEYWORD_ENTRY.CONTAINER
"
,
"
$param.ContainerName_param
"
);
var
cond
=
newWhereIfSet
(
"
AB_KEYWORD_ENTRY.CONTAINER
"
,
"
$param.ContainerName_param
"
);
if
(
vars
.
get
(
"
$param.OnlyActives_param
"
)
==
"
true
"
)
{
cond
.
and
Prepare
(
"
AB_KEYWORD_ENTRY.ISACTIVE
"
,
"
1
"
);
cond
.
and
IfSet
(
"
AB_KEYWORD_ENTRY.ISACTIVE
"
,
"
1
"
);
}
if
(
vars
.
exists
(
"
$param.ExcludedKeyIdsSubquery_param
"
)
&&
vars
.
get
(
"
$param.ExcludedKeyIdsSubquery_param
"
))
cond
.
and
(
"
AB_KEYWORD_ENTRY.KEYID
not in
(
"
+
vars
.
get
(
"
$param.ExcludedKeyIdsSubquery_param
"
)
+
"
)
"
);
cond
.
and
(
"
AB_KEYWORD_ENTRY.KEYID
"
,
"
(
"
+
vars
.
get
(
"
$param.ExcludedKeyIdsSubquery_param
"
)
+
"
)
"
,
"
not in ?
"
);
if
(
vars
.
exists
(
"
$param.WhitelistIds_param
"
)
&&
vars
.
getString
(
"
$param.WhitelistIds_param
"
))
cond
.
andIn
(
"
AB_KEYWORD_ENTRY.KEYID
"
,
JSON
.
parse
(
vars
.
getString
(
"
$param.WhitelistIds_param
"
)));
if
(
vars
.
getString
(
"
$param.WhitelistIds_param
"
))
{
var
whitelist
=
JSON
.
parse
(
vars
.
getString
(
"
$param.WhitelistIds_param
"
));
if
(
whitelist
.
length
>
0
)
cond
.
and
(
"
AB_KEYWORD_ENTRY.KEYID
"
,
JSON
.
parse
(
vars
.
getString
(
"
$param.WhitelistIds_param
"
)),
SqlBuilder
.
IN
());
else
cond
.
and
(
"
1=2
"
);
// force empty result if whitelist is empty
}
//TODO: use a preparedCondition (.build instead of .translate) when available #1030812 #1034026
result
.
string
(
cond
.
translate
(
"
1 = 1
"
));
\ No newline at end of file
This diff is collapsed.
Click to expand it.
process/Ticket_lib/process.js
+
3
−
3
View file @
43aea1be
...
...
@@ -117,10 +117,10 @@ TicketUtils.prototype.getTypeAttributes = function()
*/
TicketUtils
.
prototype
.
getAvailableStatus
=
function
()
{
var
states
=
JSON
.
parse
(
KeywordUtils
.
getAttributeRelation
(
this
.
type
,
$KeywordRegistry
.
ticketType
(),
"
availableStatus
"
,
""
))
var
states
=
JSON
.
parse
(
KeywordUtils
.
getAttributeRelation
(
this
.
type
,
$KeywordRegistry
.
ticketType
(),
"
availableStatus
"
,
"
[]
"
))
if
(
states
==
null
)
return
""
;
return
[]
;
return
states
.
map
(
StringUtils
.
pad36
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment