Jump to content

Hornbill Clean Utility


Recommended Posts

So I have checked and added "s around the True but now there is another error

Error decoding configuration file conf.json : json: cannot unmarshal string into Go struct field cleanerConfStruct.CleanAssets of type bool

The code is this, we are just clearing out one asset class:

{
    "CleanRequests": false,
    "RequestServices":[],
    "RequestCatalogItems":[],
    "RequestStatuses":[],
    "RequestTypes":[],
    "KeepRequestsCancelBPTasks": false,
    "RequestReferences":[],
    "RequestLogDateFrom":"",
    "RequestLogDateTo":"",
    "RequestClosedDateFrom":"",
    "RequestClosedDateTo":"",
    "CleanAssets": "True",
    "AssetClassID": "mobileDevice",
    "AssetTypeID": "22",
    "AssetFilters": [],
    "CleanUsers":false,
    "Users":[],
    "CleanServiceAvailabilityHistory": false,
    "ServiceAvailabilityServiceIDs": [],
    "CleanContacts": false,
    "ContactIDs": [],
    "CleanOrganisations": false,
    "OrganisationIDs": [],
    "CleanSuppliers": false,
    "SupplierIDs": [],
    "CleanSupplierContracts": false,
    "SupplierContractIDs": [],
    "CleanEmails": false,
    "EmailFilters": {
        "FolderIDs": [],
        "RecipientAddress": "",
        "RecipientClass": "",
        "ReceivedFrom": "",
        "ReceivedTo": "",
        "Subject": ""
    }
}

Link to comment
Share on other sites

7 minutes ago, Jeremy said:

Error decoding configuration file conf.json : json: cannot unmarshal string into Go struct field cleanerConfStruct.CleanAssets of type bool

In that case use true as the boolean without any quotes and all lower case. True or "True" are not boolean values

image.png

Link to comment
Share on other sites

So I have changed to 

"CleanAssets": true,
    "AssetClassID": "mobileDevice",
    "AssetTypeID": "22",
    "AssetFilters": [],

 

But there is still an error

Error decoding configuration file conf.json : json: cannot unmarshal string into Go struct field cleanerConfStruct.AssetTypeID of type int

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...