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 {
MyRequest req = mReqList.get(position);
holder.number.setText(req.getNumber());
holder.shortDescription.setText(req.getShotrDescription());
holder.shortDescription.setText(req.getCatItem().getDisplayValue());
if(!req.getApproval().isEmpty()) {
if (req.getApproval().equalsIgnoreCase("requested")) {
......
......@@ -16,8 +16,8 @@ import retrofit2.http.Query;
public interface MyRequestApi {
// Get Catalogue API
@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 {
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);
Call<ResponseBody> call = retrofit.create(MyRequestApi.class).getMyrequest(stringBuilder.toString());
Call<ResponseBody> call = retrofit.create(MyRequestApi.class).getMyRequest(stringBuilder.toString(), "true");
try {
//Retrofit synchronous call
Response<ResponseBody> response = call.execute();
......
......@@ -19,15 +19,14 @@ public class MyRequest {
@SerializedName("sys_updated_on")
// @Expose
private long updateOn;
@SerializedName("short_description")
@Expose
private String shotrDescription;
@SerializedName("approval")
@Expose
String approval;
@SerializedName("cat_item")
@Expose
MyRequestCatItem catItem;
public String getNumber() {
return number;
}
......@@ -44,12 +43,12 @@ public class MyRequest {
this.updateOn = updateOn;
}
public String getShotrDescription() {
return shotrDescription;
public MyRequestCatItem getCatItem() {
return catItem;
}
public void setShotrDescription(String shotrDescription) {
this.shotrDescription = shotrDescription;
public void setCatItem(MyRequestCatItem catItem) {
this.catItem = catItem;
}
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 {
}
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;
try {
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