Jump to content

Steve G

Hornbill Developer
  • Posts

    748
  • Joined

  • Last visited

  • Days Won

    31

Posts posted by Steve G

  1. @m.vandun @chriscorcoran @Paul Alexander @Will J Douglas

    Afternoon all,

    I've just released v1.7.0 of the R scripts - they now support using the XLSX output of the reports (as well as the existing CSV output), so you can get your Power BI reports back up and running now instead of waiting on the platform fix to the CSV issue (which is actually done and will be in the next platform update).

    Hope this helps,

    Steve

    • Like 1
  2. Good afternoon,

    We've just released v1.7.0 of the R scripts that are used to pull data from Hornbill Reporting into Power BI. The Report and HistoricReport scripts now support the use of XLSX files in the output of Hornbill reports, as well as the existing CSV options.

    The updated scripts can be downloaded now from Github.

    As always, please review the wiki documentation for the changes, but as a very basic overview:

    • XLSX output needs to be enabled against your target report configuration:
      • image.png
    • useXLSX needs to be set to TRUE in the scripts for them to target the XLSX file in the report output rather than the CSV file;
    • When useXLSX is TRUE, the readxl package is required to be installed on the machine running the scripts.

    Thanks,

    Steve

  3. Hi @Paul Alexander,

    There are two distinct issues here, one that's been fixed by an update to the R script that allows you to pull report data from Hornbill into Power BI (a correction to the response content type when API calls are made to Hornbill, that the R didn't cater for), and the second issue where CSV report data is improperly formatted. The second one I'm not sure about, as others in development are investigating that issue, but updates to that issue will be posted here:

    Cheers,

    Steve

  4. @Giuseppe Iannacone No worries. Sorry, I didn't realise that old Github repo was linked on the wiki, I'll get that updated too. We moved the PowerShell modules over to the PowerShell Gallery a good while ago, so that we had a single module source for both Windows and Azure PowerShell, rather than maintaining two codebases.

    If you visit the module pages linked above, and expand Package Details, you will get a list of the cmdlets exported by the module:

    image.png

    And if you expand FileList and click on the psm1 file, this will show you the cmdlet sourcecode, with documentation contained within for each of the exported cmdlets. See the below for Add-HB-Param:

    image.png

    Cheers,

    Steve

     

     

  5. Hi @Giuseppe Iannacone,

    The latest versions of the HornbillAPI and HornbillHelpers modules can be viewed in the PowerShell Gallery:

    https://www.powershellgallery.com/packages/HornbillAPI/1.1.0

    https://www.powershellgallery.com/packages/HornbillHelpers/1.1.1

    From PowerShell, run the following commands:

    Install-Module -Name HornbillAPI
    Install-Module -Name HornbillHelpers

    And this will install the latest versions on to your machine.

    The Github version is old, and should be deprecated - I'll do this now, thanks.

    Cheers,

    Steve

  6. Hi @Jeremy,

    Did you get anywhere with this? At a glance, I would think that the endpoint is expecting a JSON payload, but the Body param doesn't appear to be JSON formatted - unless there's some JSON written into that pcf variable... :) 

    I've just given it a test to be 100% sure though, pointing a HTTP Request node out to RequestBin, and the POST request was received as expected:

    image.png 

    Cheers,

    Steve

  7. Hi @Giuseppe Iannacone,

    I've just given this a whirl, the HornbillAPI module is working as expected, but there are a number of issues with your script - all calls to Open-Element, Close-Element and Add-Param should be replaced by the correct cmdlets: Open-HB-ElementClose-HB-Element and Add-HB-Param otherwise you wont be sending any payload to the API.

    I wrote the following very basic script as an example, using v1.1.0 of the Hornbill API module, which searches for an exact match and includes some very basic handling of when a record is not found. This is when it's successfully found a matching asset:

    image.png

    And when an asset record is not returned:

    image.png

    Hope this helps,

    Steve

  8. Hi @Will J Douglas,

    I was able to replicate this, it appears to have been caused by a change in the platform. I've updated the R scripts to cater for this, v1.6.0 is on Github now.

    You may still get the 'httr' was built under R version 3.6.2 warning - this is due to a mismatch of the version of R and the httr library on your local R installation. Updating the module from the R package library on your machine running R should sort that. 

    Thanks,

    Steve

  9. Hi @Paul Alexander,

    We've just released v1.12.0 of the cleaner tool, which allows you to add more complex filters to filter the assets for deletion by.

    So for example, if you wanted to delete all assets that have a name of YourAssetName, you would apply the following filter in the new AssetFilters array:

    {
    	"CleanRequests": false,
    	"RequestServices":[],
    	"RequestStatuses":[],
    	"RequestTypes":[],
    	"RequestReferences":[
    	],
    	"RequestLogDateFrom":"",
    	"RequestLogDateTo":"",
    	"RequestClosedDateFrom":"",
    	"RequestClosedDateTo":"",
    	"CleanAssets": true,
    	"AssetClassID": "",
    	"AssetTypeID": 0,
    	"AssetFilters": [
    		{
    			"ColumnName": "h_name",
    			"ColumnValue": "YourAssetName",
    			"Operator": "Equals",
    			"IsGeneralProperty": true
    		}
    	],
    	"CleanUsers":false,
    	"Users":[]
    }

    The way the filters work (including available operators) is all documented on the Hornbill wiki.

    Re: the 100 link limit, I'm not sure about that so I'll get someone who knows that area of the app a little better to respond.

    Cheers,

    Steve

  10. Hi @Jeremy,

    I've made some changes to the Update and Append operations, so that they will now populate success with a boolean false in the event that the operation fails for something other than an authentication issue. Authentication/token issues are still handled by a hard-fail of the operation. I've also included a new output parameter called errors, which will be populated with the error returned from Google if success equals false.

    Let me know how you get on with these.

    Cheers,

    Steve

     

    • Thanks 1
  11. Hi @Lee Jones,

    This is an issue with the R packages on the machine where you're running R and Power BI. The error is stating that the R6 package (which is imported by the httr package that the script uses) isn't available on your machine. I'd suggest re-installing httr from the CRAN repository, and if you get the same error then manually install the R6 package within your R package manager.

    Cheers,

    Steve

  12. Hi @Dan Munns,

    There are a couple of ways you could do this:

    1. You could write the answers into request custom fields, then pass the values through as input parameters to your package operation, reading them in the PowerShell and using however you need;
    2. In the PowerShell, you could make an API call to Hornbill to get the questions for the request you're processing, then extract and use the information from the response. You'd want to use the data::entityBrowseRecords2 API, something like this if you're using the HornbillAPI Module:
    Set-HB-Instance -Instance "yourinstance" -Key "yourapikey"
    Add-HB-Param "application" "com.hornbill.servicemanager"
    Add-HB-Param "entity" "Questions"
    Open-HB-Element "searchFilter"
    Add-HB-Param "column" "h_entity_ref"
    Add-HB-Param "value" $TheRequestReference
    Add-HB-Param "matchType" "exact"
    Close-HB-Element "searchFilter"
    $Questions = Invoke-HB-XMLMC "data" "entityBrowseRecords2"

    Let me know if you need anything else.

    Cheers,

    Steve

×
×
  • Create New...