Jump to content

LifeOfJonny

Hornbill Users
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by LifeOfJonny

  1. So when I do the updatemethod2 I need to provide its assetClass?
  2. Ah that makes sense. I'll update my code to use that then. What does the assetClass Atrribute do? it says "being created" yet its already created, cause I'm updating it.
  3. Ah, so the JSON properties need to be the database field names. Any reason to use updatemethod2 over updateAssetComputer?
  4. On updateAsset2, how do I tell the difference between a general or additional. Guessing additional is computer/mobile type field?
  5. Afternoon, I'm currently writing a powershell script to sync data from our asset database (Custom MSSQL DB) in to Hornbill. I can create the devices fine but I get the following error trying to update, even if you updating it with the same data. Its talking about acqMethod but not sure where its getting that for or what field where its not getting a integer, as I compared it to the API xmlmc and any field types that are integer are integers in the object. The version number does get incremented when trying to update. As I get the device from the API up the number and set it in the object. Error and code below FlowCode Exception (com.hornbill.servicemanager/entities/AssetsComputer/fc_ops/updateAssetComputer): nodeName: Invoke Flowcode: Update Asset; nodeId: b3817dd0-4812-4a98-9815-8b04e08bffd2; At 162/1: "Uncaught EspMethodCall::invoke: Operation[apps/com.hornbill.servicemanager/Asset::updateAsset] FlowCode Exception (com.hornbill.servicemanager/entities/Asset/fc_ops/updateAsset): Input parameter validation error: Non-digit characters found in the element <acqMethod>, the expected data type is 'integer'. The value was [undefined] at location '/methodCall/params/acqMethod'" throw(e); Data object for updating serialNumber : 0123123123 type : 18 version : 2 os : Windows osVersion : 10.0.18363.900 ownerName : LifeOfJonny ownerId : LifeOfJonny@LifeOfJonny.uk name : WCC-XqaVwFt0Keh - 0123123123 model : Surface Pro 6 manufacturer : Microsoft Corporation assetId : 8 Create code Function CreateComputer { param ([Parameter(Mandatory=$true)]$deviceObject) $deviceCreated = $false # Build XMLMC API call # params have to be in the expected order. Clear-Params Add-Param "name" $deviceObject.name if ($deviceObject.ownerId -ne "") { Add-Param "ownedById" $deviceObject.ownerId Add-Param "ownedByName" $deviceObject.ownerName Add-Param "ownedByType" "0" } Add-Param "type" $deviceObject.type Add-Param "version" $deviceObject.version Add-Param "manufacturer" $deviceObject.manufacturer Add-Param "model" $deviceObject.model Add-Param "osType" $deviceObject.os Add-Param "osVersion" $deviceObject.osVersion Add-Param "serialNumber" $deviceObject.serialNumber # Invoke XMLMC call, output returned as PSObject $xmlmcOutput = Invoke-XMLMC "apps/com.hornbill.servicemanager/AssetsComputer" "addAssetComputer" # Read output status if($xmlmcOutput.status -eq "ok") { # Data return is correct $deviceCreated = $true } else { # API call status not OK - return status and error to console "API Call Status : " + $xmlmcOutput.status "Error Returned : " + $xmlmcOutput.error } return $deviceCreated } Update Code Function UpdateComputer { param ([Parameter(Mandatory=$true)]$deviceObject) $deviceUpdated = $false $deviceObject # Build XMLMC API call # params have to be in the expected order. Clear-Params Add-Param "assetId" $deviceObject.assetId Add-Param "name" $deviceObject.name if ($deviceObject.ownerId -ne "") { Add-Param "ownedById" $deviceObject.ownerId Add-Param "ownedByName" $deviceObject.ownerName Add-Param "ownedByType" "0" } Add-Param "type" $deviceObject.type Add-Param "version" $deviceObject.version Add-Param "manufacturer" $deviceObject.manufacturer Add-Param "model" $deviceObject.model Add-Param "osType" $deviceObject.os Add-Param "osVersion" $deviceObject.osVersion Add-Param "serialNumber" $deviceObject.serialNumber # Invoke XMLMC call, output returned as PSObject $xmlmcOutput = Invoke-XMLMC "apps/com.hornbill.servicemanager/AssetsComputer" "updateAssetComputer" # Read output status if($xmlmcOutput.status -eq "ok") { # Data return is correct $deviceUpdated = $true } else { # API call status not OK - return status and error to console "API Call Status : " + $xmlmcOutput.status "Error Returned : " + $xmlmcOutput.error } return $deviceUpdated } Many Help would be most appreciated.
  6. Afternoon, I was using the database direct. I can't save or load Saved Queries (Manage Query's). Looking at the networking tab of Chrome I can see the web requests are getting 404. I have taken a screenshot the two requested URLs and the status code. Trying to save a simple select query Trying to open the list of queries Many Thanks Jonny
  7. Yes I can see it now, thank you :-)
  8. Hi @Yodit, The idea was to populate it and then when Hornbill allows it to be shown in different parts of the application it would already be populated for use. We wasn't going to use it in any BPM processes. The only thing we might use it for is a SQL query to check if the user has already got a hornbill user count by checking the employee ID. User Import will be taking place next week or week after. Jonny
  9. Hi Victor, See screenshot below for what we set, during our testing. Hornbillalert address was added to the hrandpayroll mailbox but still came from just hrandpayroll@ourdomain.com
  10. Thanks for the update, As its available to me in the API currently, and I'll soon be doing a big user import, should I populate while I'm at it or not bother?
  11. Hi @Victor, We set these 3 settings regarding the mailbox, notifications started working nicely, expect the mailbox prefix didn't work and it used the default address of the mailbox. I have added extra address of hornbillnotification to the selected mailbox then used that as the prefix but no dice. We have different departments sharing the hornbill instance. So we would like to use generic from name like "companyshortname Hornbill". Do we need to have a generic mailbox setup for this sort of thing? Jonny
  12. Let me discuss changing these settings with my company and I'll report back if that fixes our problem :-)
  13. Ah that makes sense, I think I miss understood abit of that wiki page. When setting guest.app.requests.notification.emailPrefix, is there a way to change the display name of the email that you get? Or will it just who what ever the Mailbox name is? As we have different departments using Hornbill, so would be nice to use a generic Display name in the email, as currently all our mailboxes are department specific names. Oh course I can add noreply to one of them but displayname would say the mailbox name right? Thanks for such a fast responce Jonny
  14. Hi Victor, guest.app.requests.notification.emailMailbox is set to helpdesk, which doesn't exist. So this needs setting to a mailbox which exists? I wasn't sure this was a requirement or not due to the fact emails for customer request updates via portal and email are coming through to my personal email. Email Template does exist, first thing I checked.
  15. Hi Hornbill, I've turned on "Assignment (Owner Notification)" and "Assignment (Team Notification)" for both Hornbill and Email notification in my user profile settings, yet when another analyst assigns me a request either to the team or directly, I don't get an email about this. The system notification works but not email. I also turned on "Portal Update" and those emails do come through when a customer updates a ticket via the portal. Am I missing something here? I've checked the Wiki page but looks like everything is ok https://wiki.hornbill.com/index.php/Service_Manager_Notification_Settings We do have "guest.app.requests.notification.allowUserDefinedNotificationType" turned on, to allow analysts to set the notification type they want. Many Thanks Jonny
  16. Hi Hornbill, Is there a reason the EmployeeId field is hidden expect when you using the SOAP API? Would be good field to show in the admin portal instead of using a custom attribute to store HR Employee Id. This would save having to use a custom attribute. Thoughts? Jonny
  17. Hey, If we could exchange the userid in brackets to email address that would do the trick for us. or even show firstname and lastname like Jon said. Glad to hear you can turn off the uniqueness of the Handle, as that's now half way to solving our problem, just need to solve the searching for co-worker issue, so if they change the handle, we can still easily findout which Jeffery they are so to speak. Jonny
  18. Hi James, We're trying to automate the creation of our users in Hornbill, so I'm trying to make sure all the unique fields don't come across duplicates. We're going to use Prefix'd randomly generated ID for the userid which will help us when user's change their surname, or have their domain changed. If making the handle long will cause UI issues, then we'll have to stick too just putting the email address in there. The idea of the example format is it shows up nicely when you search for a co worker when creating a request. Otherwise it just shows up as "JDoe@MyLongDomain.co.uk (RANDOMIDHERE).... Job title". Would be nice if it showed thier firstname and last name as well you see. We won't have 2 people with the same email address but we may have say two John Smith's so automating the creation of a second John Smith where "Firstname Lastname" format is used for handle would cause the creation to fail. We'll have to keep the handle as just the email then. If we could change how the co-worker details are shown on the user selection popup when searching a co-worker that would be just as good. As showing the userid isn't going to much use for us when its a random ID it shows. Note: We're creating our own Powershell scripts to automate the creation/update process. Jonny
  19. Hi Hornbill, Would it be possible to extend the handle field length to say 255 characters from the 64 character limit. We'd like to use the following format as our default handle if possible currently 64 characters is too short, to proceed with doing this. This way it will contain all the information we need, when we search for a co-worker. I noticed the Job Title can be very long so why not the handle. Example: John Doe - JDoe@MyLongDomain.co.uk Note: Our UserID isn't an email address it's a unique generated value. Many Thanks Jonny
×
×
  • Create New...