Issue:
Below script is used in the Zia Bot custom Actions to view the last five requests of that respective user. This is achieved by setting the row_count property in the input_data's list_info property of API. But in Zia Bot client handling, this row_count property will be removed, because of which all latest requests will be shown in the list view.
- input_data = {
- "list_info": {
- "row_count": 5,
- "start_index": 1,
- "sort_field": "id",
- "sort_order": "desc",
- "search_criteria": {
- "field": "requester",
- "value": context.get("userInfo").get("id"),
- "condition": "="
- }
- }
- };
- response = invokeurl
- [
- url: "<URL>/api/v3/requests"
- type: GET
- parameters: {"input_data":input_data}
- headers: {"TECHNICIAN_KEY":"<Tech Key>"}
- ];
- return response;
Fix:
The row_count will not be removed for Custom Actions showing list view as response.
Instructions:
-> Go to <Installation Directory>/ServiceDesk/webapps/ROOT/scripts folder.
-> Move the servicedesk.js and servicedesk_ember.js from that folder (as a Backup)
-> Download the attached files with fix and rename the file names by removing the _txt in the file extension and move it to the same folder.
-> Now do a hard refresh and try checking the list view from Zia Bot. It show the expected data.
Compatibility:
SDP 14.7.60 version (14760)
Modified Files:
servicedesk.js
servicedesk_ember.js