Commit ff2f9aa9 by Kunj Gupta

UOFLMA-33: Fix - date issue in My request screen.

parent f7dddf57
...@@ -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 getDueDate() { public long getUpdateOn() {
return dueDate; return updateOn;
} }
public void setDueDate(long dueDate) { public void setUpdateOn(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.setDueDate(Util.getDateTimeForMyRequestFromString(dueDate)); this.setUpdateOn(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";
} }
} }
...@@ -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.getDueDate()>rhs.getDueDate() ? -1 : 1; return lhs.getUpdateOn()>rhs.getUpdateOn() ? -1 : 1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment