Action Template Changes Not Showing in Audit Log

Action template changes used to show in the audit log, however changes to any custom action templates I’ve created no longer show up. I know in the past that it was working several months ago, but even those past changes are no longer showing up. I have 2 separate instances with the exact same issues. Both are at version 2018.5.6.
I also attempted to create a new action template and that also did not show up in the log.
I’ve made sure that filtering was off as well.

Thanks for the support,
Andrew

Hi Andrew,

Thanks for getting in touch,

I’m sorry to hear you are experiencing this issue, I understand this can be frustrating.

Based on the information provided in your query, I was not able to replicate this issue using 2018.5.6 and 2018.6.3 (latest), as the creation and editing events of the Action Templates appeared in the Audit log as expected, as shown below;

You mentioned in your initial post that you do not have any filters currently applied, however, is it possible that the issue lies with the date range? If the dates are indeed correct, can you try to apply the Document Type filter using Action Template to see if this helps identify the events?

I look forward to hearing back from you, your patience is greatly appreciated :slight_smile:

Kind Regards,

Reece

Hi Reece,

Thanks for the quick response.
I did try changing the date filter but it appears that there’s still no entry. I haven’t checked the database yet, but I’ll try to do that soon and get more information to see if it’s simply not showing or if its not being entered. So far I haven’t seen any errors in any logs indicating a problem, and other entries are showing up as normal.
I also tried using the document type filter as well with the same result.

If you have any suggestions for other things to try please let me know. Otherwise, I’ll try to gather more information.

Thanks for the support!
Andrew

Hi Reece,

I did some more digging, and I’ve found that the database does contain the events, but the UI/API is not retrieving them. Human error isn’t entirely ruled out yet, so feel free to double check what I did :).

I used the chrome developer tools to get the URL that was being hit by the browser:
https://OCTOPUS_SERVER/api/events?from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates

I used the time span from last month (2018-05-20) until today (2018-06-19). We’ve modified the action templates a number of times between those dates, but I did some testing on 2018-06-18 as well, so those should show up (see DB results further below).
The result was the following with 0 results (same as I saw in the UI)

{
  "ItemType": "Event",
  "TotalResults": 0,
  "ItemsPerPage": 30,
  "NumberOfPages": 1,
  "LastPageNumber": 0,
  "Items": [],
  "Links": {
    "Self": "/api/events?user=",
    "Template": "/api/events{?skip,regarding,regardingAny,user,users,projects,environments,eventGroups,eventCategories,tags,tenants,from,to,internal,fromAutoId,toAutoId,documentTypes,asCsv,take,ids}",
    "Page.All": "/api/events?skip=0&from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates&take=2147483647",
    "Page.Current": "/api/events?skip=0&from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates&take=30",
    "Page.Last": "/api/events?skip=0&from=2018-05-20T00%3A00%3A00-04%3A00&to=2018-06-20T00%3A00%3A00-04%3A00&documentTypes=ActionTemplates&take=30"
  }
}

I ran the following query on the DB, which I got from another post:

SELECT * from dbo.[event]
where RelatedDocumentIds like '%actiontemplates%'
order by occurred desc

The following results were returned (only pasting in the first block of entries)

Changed database context to 'OctopusDeploy'.
Id                                                 RelatedDocumentIds                                                                                                                                                                                                                                               ProjectId                                          EnvironmentId                                      Category                                           UserId                                             Username                                                                                                                                                                                                 Occurred                                      Message                                                                                                                                                                                                                                                          JSON                                                                                                                                                                                                                                                             TenantId                                           AutoId              
-------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- --------------------
Events-8319                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 20:58:17.9244433 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               8120
Events-8318                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 20:56:03.7897649 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               8119
Events-8317                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 20:55:55.7146815 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               8118
Events-8316                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 20:52:51.7369271 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               8117
Events-8315                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 20:32:40.5817432 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               8116
Events-8311                                        |ActionTemplates-381|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 16:21:21.9035677 +00:00 ActionTemplate Test Template was modified                                                                                                                                                                                                                        {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-381","StartIndex":15,"Length":13}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-381\",\r&para;<br>  \"Name\": \"Test Template\",\r&para;<br>  \"Description\": \"TES NULL                                                               8112
Events-8310                                        |ActionTemplates-381|                                                                                                                                                                                                                                            NULL                                               NULL                                               Created                                            Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 16:21:01.6550588 +00:00 ActionTemplate Test Template was created                                                                                                                                                                                                                         {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-381","StartIndex":15,"Length":13}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-381\",\r&para;<br>  \"Name\": \"Test Template\",\r&para;<br>  \"Description\": \"TES NULL                                                               8111
Events-8298                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-18 15:54:54.1179082 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               8099
Events-8188                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-15 21:00:16.1991449 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               7989
Events-8187                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-15 20:39:44.8477458 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               7988
Events-8186                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-15 20:06:32.6708567 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               7987
Events-8185                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-15 20:05:48.1083349 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               7986
Events-8184                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-15 20:03:04.1959893 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               7985
Events-8183                                        |ActionTemplates-364|                                                                                                                                                                                                                                            NULL                                               NULL                                               Modified                                           Users-1                                            apixley                                                                                                                                                                                                    2018-06-15 20:00:38.9479059 +00:00 ActionTemplate RunScript was modified                                                                                                                                                                                                                            {"MessageReferences":[{"ReferencedDocumentId":"ActionTemplates-364","StartIndex":15,"Length":9}],"Comments":null,"Details":"<span>{\r&para;<br>  \"Id\": \"ActionTemplates-364\",\r&para;<br>  \"Name\": \"RunScript\",\r&para;<br>  \"Description\": \"Runs the NULL                                                               7984

Any help is appreciated.

Thank you!
Andrew

Hi Andrew,

Thanks for getting back to me,

I had a chat with the team regarding this as well as spent some time troubleshooting this myself, I think this issue relates to the following Github issue;

Essentially, if you have a User belonging to two teams where one of teams has scoping applied to either Project Group, Project, Environment or Tenant then members of this team will not be able to see events in the Audit log, unfortunately, not limited to Action Templates but LibraryVariableSet Edits also seems to be affected.

In the interim, the only workaround I can think of would be to associate the User with only one team in order to view the logs successfully.

This is something we’re currently working on so I’d recommend keeping up to date with the progress of this issue at the aforementioned link, as this will provide the best visibility moving forward.

If you require any further assistance or clarification, please let me know :slight_smile:

Kind Regards,

Reece

Ahhh, thanks Reece! That is indeed the issue.
I verified by removing myself from one of the groups, and I now I’m able to see all the events.

Thanks again for your help and quick responses!
Andrew

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.