Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Feature ID" history filter does not work when the PK is not called "id" #29

Open
autra opened this issue Aug 27, 2021 · 1 comment
Labels

Comments

@autra
Copy link

autra commented Aug 27, 2021

Steps

  • have a postgis table with a PK that is not id
  • activate audit on this table
  • make some change on some feature
  • try to display the change of only one feature using the "Feature ID" text field on the plugin UI

expected: the changes are shown

actual: nothing is shown. and on the database log I can see the plugin tries to filter with id. Ex query:

2021-08-27 15:49:44.558 CEST [811474] postgres@cadastre LOG:  statement: SELECT event_id, action_tstamp_clk, schema_name || '.' || table_name, action, application_name, session_user_name, row_data, changed_fields FROM audit.logged_actions l WHERE schema_name = 'public' AND table_name = 'batiments3' AND row_data->'id'='28104' AND action IN ('I','U','D') ORDER BY action_tstamp_clk DESC

(the pk is called ogc_fid in my case)

Proposed solutions

The audit table keeps track of the pk name, let's use it to filter, instead of id.

@ponceta ponceta added the bug label Jan 30, 2023
@ponceta
Copy link
Member

ponceta commented Jan 30, 2023

This is a bug for TEKSI module wastewater (QGEP) where id are store under the field obj_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants