-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IVYPORTAL-17694 Remove usages of deprecated methods Query#fromJson an… #1346
base: master
Are you sure you want to change the base?
Conversation
…d Query#asJson - Replaced methods
public TaskQuery createQuery() { | ||
TaskQuery finalQuery = TaskQuery.create(); | ||
setNewQueryCreated(isNewQueryCreated() || customTaskQuery == null || hasTaskId() || hasCaseId()); | ||
|
||
if (!isNewQueryCreated()) { | ||
finalQuery = TaskQuery.fromJson(customTaskQuery.asJson()); // clone to keep the original custom query | ||
finalQuery.where().and(customTaskQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and or andOverall?
@@ -63,7 +64,7 @@ public CaseQuery createQuery() { | |||
|
|||
setNewQueryCreated(isNewQueryCreated() || customCaseQuery == null || hasCaseId()); | |||
if (!isNewQueryCreated()) { | |||
finalQuery.where().andOverall(CaseQuery.fromJson(customCaseQuery.asJson())); // clone to keep the original custom query | |||
finalQuery.where().andOverall(customCaseQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
andOverall or and?
@@ -244,30 +245,30 @@ private ExpiryStatistic createExpiryTimeStampToCountMap(Recordset recordSet) thr | |||
return expiryStatistic; | |||
} | |||
|
|||
@SuppressWarnings("deprecation") | |||
private TaskQuery extendQueryWithUserHasPermissionToSee(TaskSearchCriteria criteria) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before
TaskService extendQueryWithUserHasPermissionToSee: SELECT
FROM IWA_Task
LEFT JOIN IWA_TaskLocalized IWA_TaskLocalized ON (Column(IWA_Task.TaskId) = Column(IWA_TaskLocalized.TaskId) && Column(IWA_TaskLocalized.LanguageId) IN (1))
LEFT JOIN IWA_TaskCustomStringField TskCstmStrngFld_HIDE ON (Column(IWA_Task.TaskId) = Column(IWA_TaskCustomStringField.TaskId) && Column(TskCstmStrngFld_HIDE.Name) = HIDE)
WHERE (((Column(IWA_Task.State) = 0 || Column(IWA_Task.State) = 4 || Column(IWA_Task.State) = 5 || Column(IWA_Task.State) = 8 || Column(IWA_Task.State) = 1 || Column(IWA_Task.State) = 6 || Column(IWA_Task.State) = 3 || Column(IWA_Task.State) = 7 || Column(IWA_Task.State) = 11 || Column(IWA_Task.State) = 10 || Column(IWA_Task.State) = 12) && (Column(IWA_TaskLocalized.Name) ~LIKE %loc% || Column(IWA_TaskLocalized.Description) ~LIKE %loc%)) && Column(TskCstmStrngFld_HIDE.Value) IS NULL)
ORDER BY Column(IWA_Task.ExpiryTimestamp) NULL_FIRST DESCENDING
((true & true) & true)
After
extendQueryWithUserHasPermissionToSee: SELECT
FROM IWA_Task
LEFT JOIN IWA_TaskLocalized IWA_TaskLocalized ON (Column(IWA_Task.TaskId) = Column(IWA_TaskLocalized.TaskId) && Column(IWA_TaskLocalized.LanguageId) IN (1))
LEFT JOIN IWA_TaskCustomStringField TskCstmStrngFld_HIDE ON (Column(IWA_Task.TaskId) = Column(IWA_TaskCustomStringField.TaskId) && Column(TskCstmStrngFld_HIDE.Name) = HIDE)
WHERE ((Column(IWA_Task.State) = 0 || Column(IWA_Task.State) = 4 || Column(IWA_Task.State) = 5 || Column(IWA_Task.State) = 8 || Column(IWA_Task.State) = 1 || Column(IWA_Task.State) = 6 || Column(IWA_Task.State) = 3 || Column(IWA_Task.State) = 7 || Column(IWA_Task.State) = 11 || Column(IWA_Task.State) = 10 || Column(IWA_Task.State) = 12) && (Column(IWA_TaskLocalized.Name) ~LIKE %loc% || Column(IWA_TaskLocalized.Description) ~LIKE %loc%) && Column(TskCstmStrngFld_HIDE.Value) IS NULL)
ORDER BY Column(IWA_Task.ExpiryTimestamp) NULL_FIRST DESCENDING
(true & true & true)
Basically correct
@@ -281,7 +282,7 @@ private TaskQuery extendQueryWithInvolvedUser(TaskSearchCriteria criteria) { | |||
} | |||
|
|||
private TaskQuery extendQueryWithUserCanWorkOn(TaskSearchCriteria criteria) { | |||
TaskQuery finalQuery = criteria.getFinalTaskQuery(); | |||
TaskQuery finalQuery = criteria.createQuery(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before:
TaskService extendQueryWithUserCanWorkOn: SELECT
FROM IWA_Task
LEFT JOIN IWA_TaskCustomStringField TskCstmStrngFld_HIDE ON (Column(IWA_Task.TaskId) = Column(IWA_TaskCustomStringField.TaskId) && Column(TskCstmStrngFld_HIDE.Name) = HIDE)
WHERE ((Column(IWA_Task.BusinessState) = 2 || Column(IWA_Task.BusinessState) = 1 || Column(IWA_Task.BusinessState) = 0) && (Column(IWA_Task.WorkerId) = Column(IWA_Task.WorkerId) && Column(IWA_Task.State) IN (0, 4, 5, 8)) && Column(TskCstmStrngFld_HIDE.Value) IS NULL)
(true & true & true)
After
TaskService extendQueryWithUserCanWorkOn: SELECT
FROM IWA_Task
LEFT JOIN IWA_TaskCustomStringField TskCstmStrngFld_HIDE ON (Column(IWA_Task.TaskId) = Column(IWA_TaskCustomStringField.TaskId) && Column(TskCstmStrngFld_HIDE.Name) = HIDE)
WHERE (((Column(IWA_Task.BusinessState) = 2 || Column(IWA_Task.BusinessState) = 1 || Column(IWA_Task.BusinessState) = 0) && (Column(IWA_Task.WorkerId) = Column(IWA_Task.WorkerId) && Column(IWA_Task.State) IN (0, 4, 5, 8))) && Column(TskCstmStrngFld_HIDE.Value) IS NULL)
((true & true) & true)
So basically correct
…d Query#asJson