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
ff2f9aa9
authored
Sep 12, 2016
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-33: Fix - date issue in My request screen.
parent
f7dddf57
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
app/src/main/java/com/vsoft/uoflservicenow/db/models/MyRequest.java
app/src/main/java/com/vsoft/uoflservicenow/ui/MyRequestActivity.java
app/src/main/java/com/vsoft/uoflservicenow/db/models/MyRequest.java
View file @
ff2f9aa9
...
@@ -16,9 +16,9 @@ public class MyRequest {
...
@@ -16,9 +16,9 @@ public class MyRequest {
@Expose
@Expose
private
String
number
;
private
String
number
;
@SerializedName
(
"
due_date
"
)
@SerializedName
(
"
sys_updated_on
"
)
// @Expose
// @Expose
private
long
dueDate
;
private
long
updateOn
;
@SerializedName
(
"short_description"
)
@SerializedName
(
"short_description"
)
@Expose
@Expose
...
@@ -36,12 +36,12 @@ public class MyRequest {
...
@@ -36,12 +36,12 @@ public class MyRequest {
this
.
number
=
number
;
this
.
number
=
number
;
}
}
public
long
get
DueDate
()
{
public
long
get
UpdateOn
()
{
return
dueDate
;
return
updateOn
;
}
}
public
void
set
DueDate
(
long
dueDate
)
{
public
void
set
UpdateOn
(
long
updateOn
)
{
this
.
dueDate
=
dueDate
;
this
.
updateOn
=
updateOn
;
}
}
public
String
getShotrDescription
()
{
public
String
getShotrDescription
()
{
...
@@ -68,12 +68,12 @@ public class MyRequest {
...
@@ -68,12 +68,12 @@ public class MyRequest {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
this
.
set
DueDate
(
Util
.
getDateTimeForMyRequestFromString
(
dueDate
));
this
.
set
UpdateOn
(
Util
.
getDateTimeForMyRequestFromString
(
dueDate
));
}
}
public
static
class
Json
{
public
static
class
Json
{
public
static
final
String
URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE
=
"request.requested_for=javascript:gs.getUserID()"
;
public
static
final
String
URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE
=
"request.requested_for=javascript:gs.getUserID()"
;
public
static
final
String
DUE_DATE
=
"
due_date
"
;
public
static
final
String
DUE_DATE
=
"
sys_updated_on
"
;
}
}
}
}
app/src/main/java/com/vsoft/uoflservicenow/ui/MyRequestActivity.java
View file @
ff2f9aa9
...
@@ -116,7 +116,7 @@ public class MyRequestActivity extends AppCompatActivity {
...
@@ -116,7 +116,7 @@ public class MyRequestActivity extends AppCompatActivity {
class
StringDateComparator
implements
Comparator
<
MyRequest
>
{
class
StringDateComparator
implements
Comparator
<
MyRequest
>
{
public
int
compare
(
MyRequest
lhs
,
MyRequest
rhs
)
{
public
int
compare
(
MyRequest
lhs
,
MyRequest
rhs
)
{
return
lhs
.
get
DueDate
()>
rhs
.
getDueDate
()
?
-
1
:
1
;
return
lhs
.
get
UpdateOn
()>
rhs
.
getUpdateOn
()
?
-
1
:
1
;
}
}
}
}
...
...
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