Question:
The current Audit domain does not include the resource name/name, only uri which is recorded in the jiauditevent table. However, the customer need to show the resource name/label instead of the uri in their custom auditng report. They are trying to modifying the Audit domain to link the resource name/label.
Solution:
You can join the jiresource and jiresourcefolder with the foreign key parent_folder, then join with jiauditevent to link the resource name/label in Audit domain.
For example, you can create a derived table, e.g. new_table in the aduit domain as the following query:
select distinct rf.uri || '/' || r.name as resource_uri, r.label as resource_name
from jiresource r, jiresourcefolder rf
where r.parent_folder=rf.id;
Then you can add the join this derived table, e.g. new_table with the existing jiauditevent by key: new_table.resource_uri=jiauditevent.uri. After the join, you should be able to use the resource_name for your audit report.
Recommended Comments