Opened 3 years ago

Closed 3 years ago

#2250 closed task (fixed)

Named transactions

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.19
Component: core Version:
Keywords: Cc:

Description

This is a mainly a request for a new feature affecting the "Change history" logging. It would be nice to have a "Name" for entries in the change history that can identify the source of the change. Typically changes are made by either a manual edit in the web client or a plug-in executing a job, but there are also extensions that implement their own GUI for editing items.

Some information is already registered, for example, the job/plug-in and client application in use. If a name is not provided it should be possible to generate a default name:

  • If a job is active use the name of the job (and plug-in)
  • Use the name of the client application

Change History (11)

comment:1 by Nicklas Nordborg, 3 years ago

In 7946:

References #2250: Named transactions

Added ChangeHistoryData.getName() method, SessionControl.newDbControl(String). Related changes in DbControl, LogControl, TransactionDetails and ChangeHistory so that the specified name is actually stored in the change log.

If no name is specified when creating a new DbControl a name is automatically generated by SessionControl.getDefaultTransactionName() based on the current job name, plug-in name and client name.

comment:2 by Nicklas Nordborg, 3 years ago

In 7947:

References #2250: Named transactions

Implemented code for updating existing change history entries. Several side-effects due to new parameter in ScrollIterator constructor.

comment:3 by Nicklas Nordborg, 3 years ago

In 7948:

References #2250: Named transactions

Added transaction name to the change history list and view pages.

comment:4 by Nicklas Nordborg, 3 years ago

In 7950:

References #2250: Named transactions

Implemented a concept of "current client" since it is possible to access a given SessionControl with a different client application in Application.getSessionControl() than the client that created it. This "current client" information lives in a thread-local variable since it is possible that multiple threads for multiple client application is using the same SessionControl at once. The "current client" is used in the change history logging.

comment:5 by Nicklas Nordborg, 3 years ago

In 7952:

References #2250: Named transactions

Implemented functions in the web client to view change log for an entire sessions and a single transactions.

comment:6 by Nicklas Nordborg, 3 years ago

In 7953:

References #2250: Named transactions

Implemented functions in the web client to view change log for an entire sessions and a single transactions.

comment:7 by Nicklas Nordborg, 3 years ago

In 7954:

References #2250: Named transactions

Added a name to most of transactions started in JSP files.

comment:8 by Nicklas Nordborg, 3 years ago

In 7961:

References #2250: Named transactions

The change in [7950] caused settings to not be loaded due to a uninitialized left-over variable.

comment:9 by Nicklas Nordborg, 3 years ago

In 7962:

References #2250: Named transactions

Added a name to several transaction within the core. The remaining unnamed transaction are from plug-ins, but it is better to leave them as they are since the default name generation will create a good name.

comment:10 by Nicklas Nordborg, 3 years ago

In 7963:

References #2250: Named transactions

The change in [7947] where the Install client was added caused a PermissionDeniedException later on when installing plug-in definitions. This was caused by permissions being loaded before any permission information was installed. Before this change the permissions was not loaded until later. Fixed by moving the login to after all user/groups/roles etc. has been setup. And, the SystemItems and KeyRing are also re-initialized so that they have up-to-date information.

comment:11 by Nicklas Nordborg, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.