Audit export returns JSON mixed with HTML tags

(Jakub Januszkiewicz) #1

When I use the Export function in Audit, the Details column is a mix of HTML and JSON.
For example:

<span>{<br>  "Id": "variableset-LibraryVariableSets-76",<br>  "OwnerId": "LibraryVariableSets-76",<br>  "Version": 11</span><del style="background:#ffe6e6;">5</del><ins style="background:#e6ffe6;">6</ins><span><br>}</span>

I understand that this is a way to show what the changes were, but this format is only usable for display in HTML, not for parsing the exported audit via any tools.
Would it be possible to export this as JSON and indicate the change in some other, structural way?
E.g.

{ "Id": "variableset-LibraryVariableSets-76", "OwnerId": "LibraryVariableSets-76", "Version": { "OldValue": 115, "NewValue": 116 } }

Or in any other way which would allow to access this data programatically.

(Ziaul Islam) #3

Hi Jakub,

At the moment there is no way of doing this via Octopus as far as I’m, aware but, this could be a suggestion for a UserVoice, I will also point this out to the engineers as a possible feature request.

https://octopusdeploy.uservoice.com/

Fortunately, There are a lot of tools out there that will do this job with ease:

All HTML tags have been removed you all that is left is JSON data.

The tool which I use is:

https://www.browserling.com/tools/html-strip

I hope this helps.

Kind regards,
Ziaul

(Jakub Januszkiewicz) #4

@ziaul.islam I’m sorry, but how does stripping HTML tags help here? Actually it does exactly the opposite, as it removes the <del> and <ins> tags (see my example!) so my example becomes this JSON which in just plain wrong and unusable:

{ "Id": "variableset-LibraryVariableSets-76", "OwnerId": "LibraryVariableSets-76", "Version": 1156 }

(there is no version 1156 at all - it is a change from 115 to 116)

Anyway, I submitted this as https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/39136516-export-audit-as-json.

(Ziaul Islam) #5

Hi Jakub,

Extremely sorry for the oversight there.

Thank you for bringing this to my attention.

I see you have posted a UserVoice I will see to it that an engineer has a look at this for a possible feature request.

I hope you have a nice day and if there is anything else I can do for you, please let me know.

Kind regards,
Ziaul