Jump to content

Recommended Posts

Posted

Getting this error when running the clean up utility

 

entityGetRecord Unmarshal failed for Requests::No key value specified, unable to query record

 

my config

 

{
	"CleanRequests": true,
	"RequestServices": [],
	"RequestCatalogItems": [],
	"RequestStatuses": [],
	"RequestTypes": [""],
	"KeepRequestsCancelBPTasks": false,
	"RequestReferences":[""],
	"RequestLogDateFrom": "2024-04-03 16:15:00",
	"RequestLogDateTo": "2024-11-26 10:00:00",
	"RequestClosedDateFrom": "",
	"RequestClosedDateTo": "",
	"CleanAssets": false,
	"AssetClassID": "mobileDevice",
	"AssetFilters": [{
		"ColumnName": "h_type",
		"ColumnValue": "10",
		"Operator": "Equals",
		"IsGeneralProperty": true
	}],
	"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": ""
	},
	"CleanReports": false,
	"ReportIDs": []
}

 

I just want to delete all requests logged from  03/04/2024 16:15:00 to 26/11/2024 10:00:00

Posted

Hi @billster,

At a glance RequestTypes and RequestReferences are wrong - you are asking for a non-existent request type and not given any reference to remove.

Please take the other empty arrays as examples. It should look like:

"RequestTypes": [],
"RequestReferences":[],

 

Posted

@billster,

timerDelete error: That'll be permissions, please ensure the account you have generated the API key against has all the necessary permissions listed in the wiki article.

Posted

 

Hi @SamS 

Thanks for this.

I am trying to delete an additional 610 requests... but the Cleanup tool just closes when I run it.

===== Hornbill Cleaner Utility v1.20.1 =====

 Hornbill instance: aesseal
 WARNING!
 This utility will attempt to delete records from the following entities
 as specified in your configuration file:

 * Requests (and related data)

Are you sure you want to permanently delete these records? (yes/no):
yes
Are you absolutely sure? Type in the word 'delete' to confirm...
delete
Returning block 1 of 61 blocks of records from Requests entity...
2024/11/26 10:51:25 ********** Cleaner Utility Started **********
2024/11/26 10:51:28 Confirmation Prompts Accepted
2024/11/26 10:51:28 Config File Name: conf.json
2024/11/26 10:51:28 Dry Run: false
2024/11/26 10:51:28 Skip Prompts: false
2024/11/26 10:51:28 CleanRequests: true
2024/11/26 10:51:28 Filtered by Request Status(es)
2024/11/26 10:51:28 Request Status: status.open
2024/11/26 10:51:28 Filtered by RequestLogDateFrom: 0
2024/11/26 10:51:28 CleanAssets: false
2024/11/26 10:51:28 CleanUsers: false
2024/11/26 10:51:28 CleanServiceAvailabilityHistory: false
2024/11/26 10:51:28 CleanContacts: false
2024/11/26 10:51:28 CleanOrganisations: false
2024/11/26 10:51:28 CleanSuppliers: false
2024/11/26 10:51:28 CleanSupplierContracts: false
2024/11/26 10:51:29 CleanEmails: false
2024/11/26 10:51:29 [DEBUG] Record Query:  h_status IN ('status.open') AND h_datelogged >= '0'
2024/11/26 10:51:29 Block Size: 10
2024/11/26 10:51:29 Request Blocks: 61
2024/11/26 10:51:29 Total Blocks: 61
2024/11/26 10:51:29 Number of Requests to delete: 610
2024/11/26 10:51:29 ********** Cleaner Utility Completed **********

 

 

Posted

Hi @billster,

It looks in the code that the actual removal doesn't add as much detail as a dryrun does. Could you please confirm whether the requests have actually been removed? You could check in the browser (i.e. IF you are looking at one of the open calls you were expecting to remove, you would likely need to refresh the page) or by running the utility again (and see whether it still finds 610 requests to remove)?

Posted

Hi @SamS no the requests haven't been removed. I have refreshed the page and still see them in the request list and can open them too.

And yes it still sees that there are 610 requests to remove. But as soon as I run the tool and it says

Returning block 1 of 1 blocks of records from Requests entity...

The program just closes in command prompt.

 

with dryrun

 

2024/11/26 11:06:26 [DRYRUN] ********** Cleaner Utility Started **********
2024/11/26 11:06:29 [DRYRUN] Confirmation Prompts Accepted
2024/11/26 11:06:29 [DRYRUN] Config File Name: conf.json
2024/11/26 11:06:29 [DRYRUN] Dry Run: true
2024/11/26 11:06:29 [DRYRUN] Skip Prompts: false
2024/11/26 11:06:29 [DRYRUN] CleanRequests: true
2024/11/26 11:06:29 [DRYRUN] Filtered by Request Status(es)
2024/11/26 11:06:29 [DRYRUN] Request Status: status.open
2024/11/26 11:06:29 [DRYRUN] Filtered by RequestLogDateFrom: 0
2024/11/26 11:06:29 [DRYRUN] CleanAssets: false
2024/11/26 11:06:29 [DRYRUN] CleanUsers: false
2024/11/26 11:06:29 [DRYRUN] CleanServiceAvailabilityHistory: false
2024/11/26 11:06:29 [DRYRUN] CleanContacts: false
2024/11/26 11:06:29 [DRYRUN] CleanOrganisations: false
2024/11/26 11:06:29 [DRYRUN] CleanSuppliers: false
2024/11/26 11:06:29 [DRYRUN] CleanSupplierContracts: false
2024/11/26 11:06:29 [DRYRUN] CleanEmails: false
2024/11/26 11:06:29 [DEBUG] Record Query:  h_status IN ('status.open') AND h_datelogged >= '0'
2024/11/26 11:06:29 [DRYRUN] Block Size: 610
2024/11/26 11:06:30 [DRYRUN] Request Blocks: 1
2024/11/26 11:06:30 [DRYRUN] Total Blocks: 1
2024/11/26 11:06:30 [DRYRUN] Number of Requests to delete: 610
2024/11/26 11:06:30 [DRYRUN] ********** Cleaner Utility Completed **********

 

without dryrun

 

2024/11/26 11:04:26 ********** Cleaner Utility Started **********
2024/11/26 11:04:26 Confirmation Prompts Skipped
2024/11/26 11:04:26 Config File Name: conf.json
2024/11/26 11:04:26 Dry Run: false
2024/11/26 11:04:26 Skip Prompts: true
2024/11/26 11:04:26 CleanRequests: true
2024/11/26 11:04:26 Filtered by Request Status(es)
2024/11/26 11:04:26 Request Status: status.open
2024/11/26 11:04:26 Filtered by RequestLogDateFrom: 0
2024/11/26 11:04:26 CleanAssets: false
2024/11/26 11:04:26 CleanUsers: false
2024/11/26 11:04:26 CleanServiceAvailabilityHistory: false
2024/11/26 11:04:26 CleanContacts: false
2024/11/26 11:04:26 CleanOrganisations: false
2024/11/26 11:04:26 CleanSuppliers: false
2024/11/26 11:04:26 CleanSupplierContracts: false
2024/11/26 11:04:26 CleanEmails: false
2024/11/26 11:04:26 [DEBUG] Record Query:  h_status IN ('status.open') AND h_datelogged >= '0'
2024/11/26 11:04:27 Block Size: 610
2024/11/26 11:04:27 Request Blocks: 1
2024/11/26 11:04:27 Total Blocks: 1
2024/11/26 11:04:27 Number of Requests to delete: 610
2024/11/26 11:04:27 ********** Cleaner Utility Completed **********

 

Posted

Hi @billster,

Thanks for the update, I was already going through the code so see if there was anything that could explain it.

I was quite confident that the 64-bit version works - provided you are on a 64bit machine. Could you please confirm whether you are on a 32 or 64 bit machine?

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...