Bug #25530
closedshow diff in templates history not working
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
Updated by Radosław Piliszek almost 6 years ago
Same here. Also, there are no mentions of template changes in the main audit.
Updated by Tomer Brisker almost 6 years ago
- Category set to Audit Log
- Target version set to 1.20.1
- Triaged changed from No to Yes
Updated by Kavita Gaikwad almost 6 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?
Updated by Radosław Piliszek almost 6 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.
Updated by Kavita Gaikwad almost 6 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 almost 6 years ago
- File missing.PNG missing.PNG added
- File where.PNG where.PNG added
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)
Updated by Kavita Gaikwad almost 6 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?
Updated by Radosław Piliszek almost 6 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.
Updated by Tomer Brisker almost 6 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.
Updated by Radosław Piliszek almost 6 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.
Updated by Marek Hulán over 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.