changed by

9 years 2 weeks ago #1 by JFS
changed by was created by JFS
Hi!

I'm testing Jaudit at the moment for tracking changes in our configurator component. Install and setup was pretty easy and we already have a couple of entries in the change history table.
The only thing is missing are the 'changed by' column entries, although I see the name of the user who triggered this event if I look at the details of the event.

Is this a bug or am I missing something here?

Regards
J.

Please Log in or Create an account to join the conversation.

9 years 2 weeks ago #2 by geoffc
Replied by geoffc on topic changed by
There is an option to display the 'changed_by' column in the component configuration, which is by default off.

Note: The 'changed_by' field is not always populated since the database triggers do not always have the information available to determine the user. All actions in the database are 'performed' by the main Joomla database connection user, so to the database it is this user that is performing the action, which is not what one wishes to know. We know what was changed but not necessarily who changed it. Some components have an additional column in their tables which contains the information and in these cases we can get the required information to populate the audit table.

I am investigating to see if the Joomla session table holds this specific detail but at the moment it doesn't look like it does alas. Not expecting a quick or easy solution to this conundrum.

Regards
Geoff

Please Log in or Create an account to join the conversation.

9 years 2 weeks ago #3 by JFS
Replied by JFS on topic changed by
Hi Geoff,

thanks for the quick reply.

There is an option to display the 'changed_by' column in the component configuration, which is by default off.

I found that one but it's empty like I said.

I just found out that the user that is currently logged in is displayed when I check the details of an event (I attached the screenshot) and has nothing to do with the event. That is pretty uninformative or even confusing. At least I thought it is the information I'd like to see.

Like I said I'd like to use Jaudit for a custom component, so it would be possible to do some additional programming to add the user information. What approach would you suggest?

Thanks in advance
J
Attachments:

Please Log in or Create an account to join the conversation.

9 years 2 weeks ago #4 by geoffc
Replied by geoffc on topic changed by
If the 'changed_by' user is in the audit record detail it should be in the list, so yes this sounds like a bug. I will have a look to see what is amiss.

Regards
Geoff

Please Log in or Create an account to join the conversation.

9 years 2 weeks ago #5 by geoffc
Replied by geoffc on topic changed by
OK I can see what is going on. Basically if the table being audited has a 'changed_by' or 'modified_by' column then the value (integer assumed) is placed in the audit change table otherwise a zero is placed in the column by the database trigger..

It seems that when the JForm is rendered by the Joomla code because there is a zero in the column it automatically assumes this is the super user and hence places the text in the 'single audit record' display. The list display doesn't use the renderer and then just extracts the value directly from the table which is displayed as blank since user id of 0 doesn't exist.
So its nots so much a bug as a consequence of the way JForm is handling the single audit record rendering.

This is confusing I agree so it might be better just to place the super user id in the audit record rather than zero.
This requires a change to the trigger generation code, which means its not a quick change. I will look into the change and regen a new release to handle this. Will probably not be today since I would want to check out the trigger change very carefully.

Regards
Geoff

Please Log in or Create an account to join the conversation.

9 years 2 weeks ago #6 by geoffc
Replied by geoffc on topic changed by
I have just released 1.0.2 of JAudit to address this 'issue' and a couple of other minor changes.
Note that you will have to recreate the triggers to see the change in the generated audit records.
To recreate the triggers edit the trigger in the trigger view and just save it, and the existing trigger will be replaced by the newly generated trigger. If you have a lot of triggers this may take a while but there is no easy automatic way that I can (or would want) to replace the existing triggers.

Regards
Geoff

Please Log in or Create an account to join the conversation.

Time to create page: 0.190 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries