address search fix includes link with ticketnumber
This commit is contained in:
@@ -450,15 +450,15 @@ export default async function ApiProxy(req, res) {
|
||||
item.NavigationProperty.toLowerCase() +
|
||||
"_value";
|
||||
|
||||
//console.log(
|
||||
// "\n==========================================\n",
|
||||
// "basic search: " + queryUrl,
|
||||
// "\n\n",
|
||||
// item.LogicalCollectionName,
|
||||
// "\n\n",
|
||||
// WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
// "\n==========================================\n"
|
||||
// );
|
||||
console.log(
|
||||
"\n==========================================\n",
|
||||
"basic search: " + queryUrl,
|
||||
"\n\n",
|
||||
item.LogicalCollectionName,
|
||||
"\n\n",
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
"\n==========================================\n"
|
||||
);
|
||||
|
||||
const resultObj = axios
|
||||
.get(
|
||||
@@ -495,7 +495,7 @@ export default async function ApiProxy(req, res) {
|
||||
const getIncidentResultsObj = await Promise.all(
|
||||
searchResultsObj.map(async (key) => {
|
||||
var queryUrl =
|
||||
"incidents?$select=pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
||||
"incidents?$select=ticketnumber,pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
||||
key.incidentid +
|
||||
" and pinswg_appealcasetype ne null &$orderby=createdon desc&$count=true";
|
||||
|
||||
@@ -507,10 +507,11 @@ export default async function ApiProxy(req, res) {
|
||||
azureHeaders(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
return data.value[0].pinswg_publishtoweb;
|
||||
return data.value[0];
|
||||
});
|
||||
Object.assign(key, {
|
||||
"pinswg_publishtoweb": incidentObj,
|
||||
"pinswg_publishtoweb": incidentObj.pinswg_publishtoweb,
|
||||
"ticketnumber": incidentObj.ticketnumber,
|
||||
});
|
||||
|
||||
return incidentObj;
|
||||
|
||||
Reference in New Issue
Block a user