Project

General

Profile

Actions

Bug #25530

closed

show diff in templates history not working

Added by Alexandre Barth over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Category:
Audit Log
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When modifying any kind of template (provisioning templates and ptables templates at least, did not try jobs templates), the show diff button on the history tab redirects to audit page and display 'no entries found'


Files

missing.PNG View missing.PNG 28.7 KB Records seem to get created but not displayed. Radosław Piliszek, 12/02/2018 03:19 PM
where.PNG View where.PNG 26.4 KB Where do I change this 'taxonomy'? Radosław Piliszek, 12/02/2018 03:19 PM
Actions #1

Updated by Radosław Piliszek over 5 years ago

Same here. Also, there are no mentions of template changes in the main audit.

Actions #2

Updated by Tomer Brisker over 5 years ago

  • Category set to Audit Log
  • Target version set to 1.20.1
  • Triaged changed from No to Yes
Actions #3

Updated by Kavita Gaikwad over 5 years ago

  • Assignee set to Kavita Gaikwad
Actions #4

Updated by Kavita Gaikwad over 5 years ago

Could you please share steps to reproduce?
I have tried but failed to reproduce this scenario.

For admin user, are you able to see any entry under audit page?

Actions #5

Updated by Radosław Piliszek over 5 years ago

Yes, there are entries but not for changes in templates.
Note this is an installation upgraded from 1.19. It could be that it happened in 1.19 but just was not observed.

Actions #6

Updated by Kavita Gaikwad over 5 years ago

Radosław Piliszek wrote:

Yes, there are entries but not for changes in templates.
Note this is an installation upgraded from 1.19. It could be that it happened in 1.19 but just was not observed.

Thank you for providing additional details. It would be great help if you share your observations on below points:

1. What you see under audits page by changing taxonomy scope to "Any organization" & "Any location". Any records related to template changes?
2. If yes, that means template changes are getting recorded under audit.
could you please confirm that those records contains your previously selected organization under Affected Organizations and location
under affected locations.
3. If not then please confirm that whether audit records related to template changes are present in database itself or not?
4. Are you looking at old audit records? or audit record won't get created when new changes in templates?

It might be possibility that selected taxanomy was not associated with template when audits data created for that template.
In short, selected taxonomy are not there under affected Organizations/locations of audit records for which you are clicking to see "Show diff".

Updated by Radosław Piliszek over 5 years ago

1, 2. Where do I change this 'taxonomy'? See the attached screenshot "where.png".
3, 4. Records seem to get created but not displayed. See the attached screenshot "missing.png" and below:

foreman=# SELECT id FROM audits WHERE id = 24409;
  id
-------
 24409
(1 row)
Actions #8

Updated by Kavita Gaikwad over 5 years ago

Radosław Piliszek wrote:

1, 2. Where do I change this 'taxonomy'? See the attached screenshot "where.png".
3, 4. Records seem to get created but not displayed. See the attached screenshot "missing.png" and below:

[...]

1. Could you please confirm that taxonomies i.e. Organization & Location are disabled on your setup.
Or it could be possible - user that you are using is limited to only one taxonomy i.e Organization/location.

2. Any other user mostly check with admin whether able to see changes from template?

Actions #9

Updated by Radosław Piliszek over 5 years ago

1. I have no mention of taxonomies anywhere in the UI.
2. This is the admin user that made the changes as well.

Actions #10

Updated by Tomer Brisker over 5 years ago

  • Target version deleted (1.20.1)

It seems you have disabled locations and organizations in your settings.yaml and the audit history doesn't display correctly due to that. Considering that this option is deprecated and will be removed in 1.21 (due in part to multiple bugs around it, see https://community.theforeman.org/t/proposal-remove-support-for-disabling-taxonomies-or-login/10972 for further info), I don't expect this issue to be resolved, but will keep this issue open for now.

Actions #11

Updated by Radosław Piliszek over 5 years ago

Turning on locations and organizations fixed the problem immediately.
It works just fine now with Any/Any filter.
Thank you.

As a side note, I did not see that notification mentioned in the link you posted.
I skimmed over release notes and ignored this particular deprecation.
I suggest highlighting this fact more.

Actions #12

Updated by Marek Hulán about 5 years ago

  • Status changed from New to Resolved

This is resolved by 1.21 where orgs and locs are always enabled, please reopen if I misunderstood.

Actions

Also available in: Atom PDF