Jump to content

TomW

Hornbill Users
  • Posts

    54
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by TomW

  1. Hello Steve It was scheduled using the calendar button (shown in green): I thought at first it happened if I didn't un-schedule this change first (like below): I tried to replicate this again today by not un-scheduling it first but this time it set the date normally like this:
  2. Some of the dates in the Timeline are stored like yours , but others don't or are a mix of GMT time and normal (normal like the format in Berto's screen shot above)
  3. I have encountered a rather bizarre issue in the Timeline of change requests when the request is scheduled. The Scheduled to and from date appear in different formats: As you can see one date and time is in GMT format and the other isn't? I have never encountered this before so If you can offer any advice please let me know. Thanks Tom
  4. I tried calling a similar API request but this time calling the "read" API method within the "SearchHistory" web service as follows: function Get_SearchHistory { <# .SYNOPSIS Attempt to get a list of scheduled requests #> #region : VARIABLES [String]$Method = "read" [String]$Parameter = @() [String]$RestMethod = "post" [String]$Service = "apps/com.hornbill.servicemanager/SearchHistory" [Int]$deskID = 5 #this field is int32 where the maximum value is 2147483647 [Int]$RowStart = 1 [Int]$RowCount = 20 #this field is int32 where the maximum value is 2147483647 #endregion @ VARIABLES #region : Assign API parameters $Parameter = @( "<searchTerm></searchTerm>" ) Write-Host($RowStart) #endregion : Assign API parameters [String]$ParameterIsCMInstalled = "true" [String]$ParameterLanguage = "en-GB" Try { $InvokeSmXmlMcParam = @{ Method = $Method Parameter = $Parameter RestMethod = $RestMethod Service = $Service ErrorAction = 'Stop' } #Write-Host($InvokeSmXmlMcParam) $ApiResponse = Invoke-HbRestMethod @InvokeSmXmlMcParam $retVal = $ApiResponse } #Try Catch { $retVal = -1 Write-Error $_.Exception.Message } #catch return $retVal } The output, particularly the JSON, was as follows: queryExecJSON ------------- ["finance","mam","morning","etarmis"] Unlike the "getScheduledRequests" API method this one seems to work. I suspect the the "getScheduledRequests" API method is broken. It shows as successful but returns no data even though we have numerous scheduled requests.
  5. I am trying to retrieve a list of requests that have been scheduled using the Hornbill API. The API that I am calling is the getScheduledRequests API and I am using the following PowerShell script: function Get_ScheduledRequests { <# .SYNOPSIS Attempt to get a list of scheduled requests #> #region : VARIABLES [String]$Method = 'getScheduledRequests' [String]$Parameter = @() [String]$RestMethod = 'post' [String]$Service = 'apps/com.hornbill.servicemanager/ScheduledRequests' [Int]$RowStart = 1 [Int]$RowCount = 2147483647 #this field is int32 where the maximum value is 2147483647 #endregion @ VARIABLES #region : Assign API parameters $Parameter = @( #"<searchFilter>h_status=status.open</searchFilter>" #"<deskId></deskId>" "<rowStart>$RowStart</rowStart>" "<rowLimit>$RowCount</rowLimit>" ) #endregion : Assign API parameters [String]$ParameterIsCMInstalled = 'true' [String]$ParameterLanguage = "en-GB" Try { $InvokeSmXmlMcParam = @{ Method = $Method Parameter = $Parameter RestMethod = $RestMethod Service = $Service ErrorAction = 'Stop' } echo($InvokeSmXmlMcParam) $ApiResponse = Invoke-HbRestMethod @InvokeSmXmlMcParam $retVal = $ApiResponse } #Try Catch { $retVal = -1 Write-Error $_.Exception.Message } #catch return $retVal } The value returned is as follows: outcome totalRecordCount scheduledRequests ------- ---------------- ----------------- success 0 [] We have a lot of requests which have been scheduled so I am wondering if I am passing the wrong information to the API method. I know the rest of the code (not shown above) works fine as I use other Hornbill APIs to run and retrieve reports. If you could highlight any obvious mistakes I've made or point me in the right direction that would be a great help!
  6. Thanks for the information. I will see if we can use the service level targets for this. Cheers Tom
  7. Hello I was wondering if it is possible to automatically close a call if it has been active for certain period of time? For example if an incident was raised 2 weeks ago and the company has a policy to close all active (open, new, on hold etc.) incidents that are over 2 weeks old. Would this have to be done in a workflow or is there a setting in Hornbill that does this?
  8. Further to the issue above I have been trying to pass the user input variable when calling the "reportRun" API as follows: $Parameter = @( "<reportid>$reportID</reportid>" "<runtimeParameter><inputParameter><uuid>idDateLogged</uuid><value>2019-04-30 00:00:01</value></inputParameter></runtimeParameter>" ) When the code runs I get the error: Running report: 516 Run-HbReport : The element <uiid> was expected 1 time(s) at location '/methodCall/params/runtimeParameter/inputParameter/uuid' but encountered <uuid> instead At G:\Release Team\PowerBI\Incidents Related to Known Errors and Problems - Exp\Experiments\RCV - Known Errors Problems and Associated Calls\PowerShell Script\Run and Download Report.ps1:369 char:23 + $runRepResponse = Run-HbReport($reportId) + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Run-HbReport The value "idDateLogged" in my code is the variable reference name that is stored when the user is asked to input a date when running the report manually. Although I may be using the wrong value for the uuid the error message returned shows that it was expecting the element "<uiid>" which isn't mentioned anywhere in the API documentation for the "reportRun" API method, and is not present in the PowerShell code that I wrote. Please could you offer some advice? Cheers
  9. I have been writing code to run, check and retrieve reports using the Hornbill API (via a PowerShell script), and this all works fine. However a couple reports have filters like "Requests -> Date Logged value is less than <User prompted input>". Is It possible to pass the "<User prompted input>" values when using the API, e.g. using something like the 'runtimeParameter' input parameter? If so how would I go about doing this? I've had a look at the source code for the 'goHornbillReportRunner-master' but the report runner doesn't include an option for this. Any advice would be useful, even confirming if this isn't possible would help as it would stop me barking up a none existent tree. Cheers Tom
  10. I have finally got this working after spending too much time barking up the wrong tree. The code to do this in PowerShell is fairly simple: [string]$url = $davendpoint + "reports/" + $reportID + "/" + $reportFileLink echo("URI: " + $url) Try { $wc = New-Object System.Net.WebClient $wc.Headers.Add("Authorization","ESP-APIKEY " + $apiKey) $wc.DownloadFile($url,$outputLocation) return -1 } Catch { Write-Error $_.Exception.Message #echo("hey ho pip and dandy") return $apiResponse } The $davendpoint variable is just the combination the values that you advised above. thanks for your help. Cheers, Tom
  11. Thanks for the information and for getting back so quickly. I'll have a look at it now.
  12. I am writing a PowerShell script to run a report using the Hornbill api and then to download the report to a specified directory. I can run the report and retrieve the name for the report e.g. "Check for Re-Openned Calls_23851.xlsx" but I do not know where I can retreieve the report from. please could you offer some advice? Cheers Tom
  13. sorry I posted this query on the wrong forum. It should be on the service manager forum
  14. I am writing a PowerShell script to run a report using the Hornbill api and then to download the report to a specified directory. I can run the report and retrieve the name for the report e.g. "Check for Re-Openned Calls_23851.xlsx" but I do not know where I can retreieve the report from. please could you offer some advice? Cheers Tom
  15. Also the report only takes three seconds to run.
  16. Thanks for your advice. The log file shows the following information: "2020/01/20 09:36:01 ---- Hornbill Report Runner V1.0.0 ---- 2020/01/20 09:36:01 Flag - Configuration File: conf.json 2020/01/20 09:36:01 [DEBUG] Loading Config File: C:\Temp/conf.json 2020/01/20 09:36:43 Running report RCV - Check for Re-Openned Calls [417]. 2020/01/20 09:37:04 [ERROR] Post https://eurapi.hornbill.com/*removed*/reporting/?method=reportRun: dial tcp *removed*:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond." When I use nslookup I get the following information: "C:\Temp>nslookup eurapi.hornbill.com Server: *removed* Address: *removed* Non-authoritative answer: Name: eurapi.hornbill.com Address: *removed*" I am not a network savvy person so I don't understand the response.
  17. I am trying to run and retrieve reports using the Hornbill Report Runner and have entered the relevant information in the conf.json file. When I run the command "goHornbillReportRunner_x86.exe -file=conf.json" I get the following response in the command prompt: "---- Hornbill Report Runner V1.0.0 ---- Flag - Configuration File: conf.json Running report RCV - Check for Re-Openned Calls [417]. [ERROR] Post https://eurapi.hornbill.com/'removed'/reporting/?method=reportRun: dial tcp 'removed': connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond." Could you offer any advice?
  18. Thanks for the information Steve, it is a great help. Cheers Tom
  19. Hello I was wondering if it is possible to access a report in Hornbill using one of the APIs in Hornbill? Thanks Tom
  20. I found this elsewhere on the forum which dates back to 2017 but has been updated in July this year (2019): Discussion on Timesheet Manager
  21. Thanks for your reply. I can see the timesheet for myself but I need to be able to pull up a report on how much time has been spent working on calls per team or project etc.
  22. Is there a way to find how much time has been spent working on a call? I know that you can find out how much time a call has been open for "current date - date raised" or "date resolved - date raised", but I am looking for the time the call has been worked on e.g. when someone adds the time that they have spent working on the call when making an update or resolving it. Please could you point me in the write direction i.e. what tables and fields that I should be look at? Thanks Tom
  23. I just had a look and yes this does only appear in the preview window. If you run the report the dates are the normal. It looks like the preview window fix was missed in the last batch of updates.
  24. When looking for re-scheduled change requests I noticed a discrepancy in the time zone types. The dates stored in the 'Start Time' and 'End Time' fields are in GMT (Greenwich Mean Time), but in the scheduled date shown in the Timeline of the call it appears in BST (British Summer Time) which is one hour ahead! Is this a system setup issue, a minor issue with Hornbill, or something else altogether?
×
×
  • Create New...