Hi everyone! I hope you're fine,
You'll see, I'm trying to perform an ASSETs import automation, following the next guide:
I have successfully performed the automation, reading a CSV and submitting the data, Update and Create work both without any issue
The thing is, I need to make a report if the automation went well (or at least if it seems to)
When the importing is done, I get the following response performing an API REST call to the getExecutionStatus url (see the Step 5b: Start an import in the Imports REST API Guide):
NOTE: This time I'm performing an import without any new ASSET nor ASSET update (since I'll be doing the import daily and a non-change case could present)
{
"status": "DONE",
"progressResult": {
"type": "IMPORT",
"id": 100,
"started": "2023-04-13T09:59:57.941+00:00",
"ended": "2023-04-13T10:00:01.666+00:00",
"objectSchemaId": 1,
"result": "OK",
"status": "FINISHED",
"infoMessage": "No data to import",
"jobId": "19747985-e0a4-4g83-af0c-f757c4fceb34",
"importSourceId": "89e6a7ad-2cda-4c0f-80e3-71d9ae35caf8",
"populatedObjectTypes": [
"Book"
],
"onlyExecutedForObjectTypes": [],
"objectTypeResultMap": {
"1": {
"id": null,
"objectTypeName": "Book",
"objectTypeId": 1,
"objectsUpdated": 0,
"objectsCreated": 0,
"objectsIdentical": 175,
"objectsMissingUpdated": 0,
"objectsMissingDeleted": 0,
"entriesInSource": 260,
"duplicateEntries": 0,
"emptyLabelEntries": 0,
"emptyExternalIdEntries": 0,
"objectsFilteredWithQlQuery": 0,
"errorMessages": null,
"readExternalDataTimeInMs": 6,
"mapExternalDataTimeInMs": 0,
"qlQueryFilteringTimeInMs": 0,
"decidingActionsTimeInMs": 10,
"writeInsightDataTimeInMs": 0,
"postFunctionTimeInMs": 0,
"executionTimeInMs": 16,
"objectsWithUpdatedReferences": 0
}
},
"errorMessages": null,
"totalNumberEntriesInImport": 260
}
}
I was thinking to make a comparision
# Using Python 3.x
if objectsUpdated + objectsCreated + objectsIdentical + objectsMissingUpdated + objectsMissingDeleted + duplicateEntries + emptyLabelEntries == entriesInSource:
return True # All good
else:
return False # Oh, something happened
But objectsIdentical varies each execution... with the same CSV... (and I'm performing the tests in a sandbox environment, so, I know nobody is creating / updating ASSETs besides me)
I know that errorMessages is an useful field too, but I'm trying to understand this issue
Do you know why is this happening? Or how to fix it?
Thanks in advance
Best regards,
Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.
Register here ⬇️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.