Commit 71979213 by Kunj Gupta

UOFLMA-33 - Fix - description is not showing same as website.

parent ceab0740
...@@ -74,7 +74,7 @@ public class MyRequestAdapter extends BaseAdapter { ...@@ -74,7 +74,7 @@ public class MyRequestAdapter extends BaseAdapter {
MyRequest req = mReqList.get(position); MyRequest req = mReqList.get(position);
holder.number.setText(req.getNumber()); holder.number.setText(req.getNumber());
holder.shortDescription.setText(req.getShotrDescription()); holder.shortDescription.setText(req.getCatItem().getDisplayValue());
if(!req.getApproval().isEmpty()) { if(!req.getApproval().isEmpty()) {
if (req.getApproval().equalsIgnoreCase("requested")) { if (req.getApproval().equalsIgnoreCase("requested")) {
......
...@@ -16,8 +16,8 @@ import retrofit2.http.Query; ...@@ -16,8 +16,8 @@ import retrofit2.http.Query;
public interface MyRequestApi { public interface MyRequestApi {
// Get Catalogue API // Get Catalogue API
@GET(Constants.URL_GET_MYREQUEST) @GET(Constants.URL_GET_MYREQUEST)
Call<ResponseBody> getMyrequest(@Query(Constants.URL_PARAM_SYSPRM_QUERY) String sysparmQuery); Call<ResponseBody> getMyRequest(@Query(Constants.URL_PARAM_SYSPRM_QUERY) String sysparmQuery,
@Query(Constants.URL_PARAM_SYSPRM_DISPLAY_VALUE) String sysparmDisplayValue);
} }
......
...@@ -36,7 +36,7 @@ public class MyRequestApiManager { ...@@ -36,7 +36,7 @@ public class MyRequestApiManager {
stringBuilder.append(MyRequest.Json.URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE); stringBuilder.append(MyRequest.Json.URL_PARAM_CATALOGUE_SYSPRM_QUERY_VALUE);
final Retrofit retrofit = RestClient.getInitializedRestAdapter(Constants.API_AUTH_PARAM_USER_NAME, Constants.API_AUTH_PARAM_PASSWORD); final Retrofit retrofit = RestClient.getInitializedRestAdapter(Constants.API_AUTH_PARAM_USER_NAME, Constants.API_AUTH_PARAM_PASSWORD);
Call<ResponseBody> call = retrofit.create(MyRequestApi.class).getMyrequest(stringBuilder.toString()); Call<ResponseBody> call = retrofit.create(MyRequestApi.class).getMyRequest(stringBuilder.toString(), "true");
try { try {
//Retrofit synchronous call //Retrofit synchronous call
Response<ResponseBody> response = call.execute(); Response<ResponseBody> response = call.execute();
......
...@@ -19,15 +19,14 @@ public class MyRequest { ...@@ -19,15 +19,14 @@ public class MyRequest {
@SerializedName("sys_updated_on") @SerializedName("sys_updated_on")
// @Expose // @Expose
private long updateOn; private long updateOn;
@SerializedName("short_description")
@Expose
private String shotrDescription;
@SerializedName("approval") @SerializedName("approval")
@Expose @Expose
String approval; String approval;
@SerializedName("cat_item")
@Expose
MyRequestCatItem catItem;
public String getNumber() { public String getNumber() {
return number; return number;
} }
...@@ -44,12 +43,12 @@ public class MyRequest { ...@@ -44,12 +43,12 @@ public class MyRequest {
this.updateOn = updateOn; this.updateOn = updateOn;
} }
public String getShotrDescription() { public MyRequestCatItem getCatItem() {
return shotrDescription; return catItem;
} }
public void setShotrDescription(String shotrDescription) { public void setCatItem(MyRequestCatItem catItem) {
this.shotrDescription = shotrDescription; this.catItem = catItem;
} }
public String getApproval() { public String getApproval() {
......
package com.vsoft.uoflservicenow.db.models;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by kvemulavada on 8/30/2016.
*/
public class MyRequestCatItem {
@SerializedName("display_value")
@Expose
private String displayValue;
@SerializedName("link")
@Expose
private String link;
public String getDisplayValue() {
return displayValue;
}
public void setDisplayValue(String displayValue) {
this.displayValue = displayValue;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
}
...@@ -303,7 +303,7 @@ public class Util { ...@@ -303,7 +303,7 @@ public class Util {
} }
public static long getDateTimeForMyRequestFromString(String strDate) { public static long getDateTimeForMyRequestFromString(String strDate) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
Date date = null; Date date = null;
try { try {
date = df.parse(strDate); date = df.parse(strDate);
......
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