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
Hide 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 {
@Expose
private
String
number
;
@SerializedName
(
"
due_date
"
)
@SerializedName
(
"
sys_updated_on
"
)
// @Expose
private
long
dueDate
;
private
long
updateOn
;
@SerializedName
(
"short_description"
)
@Expose
...
...
@@ -36,12 +36,12 @@ public class MyRequest {
this
.
number
=
number
;
}
public
long
get
DueDate
()
{
return
dueDate
;
public
long
get
UpdateOn
()
{
return
updateOn
;
}
public
void
set
DueDate
(
long
dueDate
)
{
this
.
dueDate
=
dueDate
;
public
void
set
UpdateOn
(
long
updateOn
)
{
this
.
updateOn
=
updateOn
;
}
public
String
getShotrDescription
()
{
...
...
@@ -68,12 +68,12 @@ public class MyRequest {
e
.
printStackTrace
();
}
this
.
set
DueDate
(
Util
.
getDateTimeForMyRequestFromString
(
dueDate
));
this
.
set
UpdateOn
(
Util
.
getDateTimeForMyRequestFromString
(
dueDate
));
}
public
static
class
Json
{
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 {
class
StringDateComparator
implements
Comparator
<
MyRequest
>
{
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