Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4c7d9383
authored
Apr 13, 2018
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fixed - handle the null value.
parent
d094cfdb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
app/src/main/java/com/vsoft/servicenow/ui/CatalogueVariableScreen.java
app/src/main/java/com/vsoft/servicenow/ui/HRCaseVariableScreen.java
app/src/main/java/com/vsoft/servicenow/ui/CatalogueVariableScreen.java
View file @
4c7d9383
...
@@ -186,6 +186,8 @@ public class CatalogueVariableScreen extends HandleNotificationActivity {
...
@@ -186,6 +186,8 @@ public class CatalogueVariableScreen extends HandleNotificationActivity {
if
(
mApplication
.
isNetConnected
())
{
if
(
mApplication
.
isNetConnected
())
{
isProgressRequire
=
mCatalogueVariableList
.
isEmpty
();
isProgressRequire
=
mCatalogueVariableList
.
isEmpty
();
new
FetchCatalogueVariable
().
execute
();
new
FetchCatalogueVariable
().
execute
();
}
else
if
(
mCatalogueVariableList
.
isEmpty
())
{
DialogUtils
.
showNoConnectionDialog
(
CatalogueVariableScreen
.
this
);
}
}
}
}
...
@@ -1145,15 +1147,20 @@ public class CatalogueVariableScreen extends HandleNotificationActivity {
...
@@ -1145,15 +1147,20 @@ public class CatalogueVariableScreen extends HandleNotificationActivity {
continue
;
continue
;
}
}
boolean
conditionsSatisfied
=
true
;
boolean
conditionsSatisfied
=
true
;
for
(
int
j
=
0
;
j
<
item
.
getPartialConditions
().
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
item
.
getPartialConditions
().
size
();
j
++)
{
PartialCondition
partialCondition
=
item
.
getPartialConditions
().
get
(
j
);
PartialCondition
partialCondition
=
item
.
getPartialConditions
().
get
(
j
);
CatalogueVariable
variable
=
getVariableForSysId
(
partialCondition
.
getViewSysId
());
CatalogueVariable
variable
=
getVariableForSysId
(
partialCondition
.
getViewSysId
());
VariableViewContainer
variableViewContainer
=
mVariableViewMap
.
get
(
variable
.
getSysId
());
VariableViewContainer
variableViewContainer
;
if
(
variableViewContainer
==
null
||
variableViewContainer
.
getInputView
()
==
null
)
{
if
(
variable
==
null
)
{
continue
;
}
else
{
variableViewContainer
=
mVariableViewMap
.
get
(
variable
.
getSysId
());
}
if
(
variableViewContainer
==
null
||
variableViewContainer
.
getInputView
()
==
null
)
{
continue
;
continue
;
}
}
String
value
=
Util
.
getVariableViewValueForUIPolicy
(
variableViewContainer
.
getInputView
(),
variable
);
String
value
=
Util
.
getVariableViewValueForUIPolicy
(
variableViewContainer
.
getInputView
(),
variable
);
switch
(
partialCondition
.
getOperator
())
{
switch
(
partialCondition
.
getOperator
())
{
case
EQUAL:
case
EQUAL:
conditionsSatisfied
=
conditionsSatisfied
&&
value
.
equals
(
partialCondition
.
getOperatorValue
());
conditionsSatisfied
=
conditionsSatisfied
&&
value
.
equals
(
partialCondition
.
getOperatorValue
());
break
;
break
;
...
...
app/src/main/java/com/vsoft/servicenow/ui/HRCaseVariableScreen.java
View file @
4c7d9383
...
@@ -64,6 +64,7 @@ import com.vsoft.servicenow.db.managers.HRCaseUiPolicyActionManager;
...
@@ -64,6 +64,7 @@ import com.vsoft.servicenow.db.managers.HRCaseUiPolicyActionManager;
import
com.vsoft.servicenow.db.managers.HRCaseUiPolicyItemManager
;
import
com.vsoft.servicenow.db.managers.HRCaseUiPolicyItemManager
;
import
com.vsoft.servicenow.db.managers.HRCaseVariableChoiceManager
;
import
com.vsoft.servicenow.db.managers.HRCaseVariableChoiceManager
;
import
com.vsoft.servicenow.db.managers.HRCaseVariableManager
;
import
com.vsoft.servicenow.db.managers.HRCaseVariableManager
;
import
com.vsoft.servicenow.db.models.CatalogueVariable
;
import
com.vsoft.servicenow.db.models.HRCaseAttachment
;
import
com.vsoft.servicenow.db.models.HRCaseAttachment
;
import
com.vsoft.servicenow.db.models.HRCaseItem
;
import
com.vsoft.servicenow.db.models.HRCaseItem
;
import
com.vsoft.servicenow.db.models.HRCaseItemInput
;
import
com.vsoft.servicenow.db.models.HRCaseItemInput
;
...
@@ -185,6 +186,8 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
...
@@ -185,6 +186,8 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
if
(
mApplication
.
isNetConnected
())
{
if
(
mApplication
.
isNetConnected
())
{
isProgressRequire
=
mHRCaseVariableList
.
isEmpty
();
isProgressRequire
=
mHRCaseVariableList
.
isEmpty
();
new
FetchCatalogueVariable
().
execute
();
new
FetchCatalogueVariable
().
execute
();
}
else
if
(
mHRCaseVariableList
.
isEmpty
())
{
DialogUtils
.
showNoConnectionDialog
(
HRCaseVariableScreen
.
this
);
}
}
}
}
...
@@ -1144,15 +1147,20 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
...
@@ -1144,15 +1147,20 @@ public class HRCaseVariableScreen extends HandleNotificationActivity {
continue
;
continue
;
}
}
boolean
conditionsSatisfied
=
true
;
boolean
conditionsSatisfied
=
true
;
for
(
int
j
=
0
;
j
<
item
.
getPartialConditions
().
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
item
.
getPartialConditions
().
size
();
j
++)
{
PartialCondition
partialCondition
=
item
.
getPartialConditions
().
get
(
j
);
PartialCondition
partialCondition
=
item
.
getPartialConditions
().
get
(
j
);
HRCaseVariable
variable
=
getVariableForSysId
(
partialCondition
.
getViewSysId
());
HRCaseVariable
variable
=
getVariableForSysId
(
partialCondition
.
getViewSysId
());
VariableViewContainer
variableViewContainer
=
mVariableViewMap
.
get
(
variable
.
getSysId
());
VariableViewContainer
variableViewContainer
;
if
(
variableViewContainer
==
null
||
variableViewContainer
.
getInputView
()
==
null
)
{
if
(
variable
==
null
)
{
continue
;
}
else
{
variableViewContainer
=
mVariableViewMap
.
get
(
variable
.
getSysId
());
}
if
(
variableViewContainer
==
null
||
variableViewContainer
.
getInputView
()
==
null
)
{
continue
;
continue
;
}
}
String
value
=
Util
.
getVariableViewValueForUIPolicy
(
variableViewContainer
.
getInputView
(),
variable
);
String
value
=
Util
.
getVariableViewValueForUIPolicy
(
variableViewContainer
.
getInputView
(),
variable
);
switch
(
partialCondition
.
getOperator
())
{
switch
(
partialCondition
.
getOperator
())
{
case
EQUAL:
case
EQUAL:
conditionsSatisfied
=
conditionsSatisfied
&&
value
.
equals
(
partialCondition
.
getOperatorValue
());
conditionsSatisfied
=
conditionsSatisfied
&&
value
.
equals
(
partialCondition
.
getOperatorValue
());
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment