Bug 996932

Summary: GDT Audit log: column updates not caught
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: Roger Martínez <romartin>
Status: CLOSED CURRENTRELEASE QA Contact: Zuzana Krejčová <zkrejcov>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: atangrin, etirelli, lpetrovi, rrajasek
Target Milestone: ER6   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:18:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zuzana Krejčová 2013-08-14 10:05:38 UTC
Description of problem:
If you set the Audit log to catch column updates, some updates are still ignored.

Ignored updates:
- setting default value
- entry point, update engine
- logically insert
- use row number & reverse order for salience
- hide column (thought this one might not be a problem)


Version-Release number of selected component (if applicable):
kie-wb 6.0 CR1

Comment 1 Edson Tirelli 2013-09-17 14:17:43 UTC
Lukas, please lets talk why you think this is a beta blocker.

Comment 5 Roger Martínez 2013-10-07 20:53:47 UTC
(In reply to Zuzana Krejčová from comment #0)
> Description of problem:
> If you set the Audit log to catch column updates, some updates are still
> ignored.
> 
> Ignored updates:
> - setting default value
> - entry point, update engine
> - logically insert
> - use row number & reverse order for salience
> - hide column (thought this one might not be a problem)
> 
> 
> Version-Release number of selected component (if applicable):
> kie-wb 6.0 CR1

Hi Zuzana,

I've two questions about this issue.. Sorry about that but it's my first contact with this component..

Question1
----------
There are some column updates that I dont'w know how to produce.

Please, can you clarify how to produce a column update for:
- logically insert
- use row number & reverse order for salience

I mean, which is the field when editting a column do I have to modify to produce these each type of the update?

For the other events there is no problem, I understand how to produce them and I've already fixed in my local environemnt.

Question2
---------
As far as I know there exist three types of columns:
- Condition column (Displayed in the section "Condition columns" of the GDT widget)
- Action column (Displayed in the section "Action columns" of the GDT widget)
- Attribute/Metadata column (Displayed in the section "Options" of the GDT widget)

Do you know if all of these ignored updates must apply for all columns? (If the event type is applicable for the column type..)

For example: The update "hide column" applies for condition, action and attribute/metadata columns? Or attribute/metadata columns does not require to log for hide column updates?

Thanks in advance.
Regards

Comment 7 Roger Martínez 2013-10-09 21:26:52 UTC
Hi,

I have implemented all column update events missing.

The following list shows for each field that must fire a update column event, the type of column where it has been implemented:

- FIELD: default value
  - condition columns
  - action columns
    - set value of a field
    - set value of a field on a new fact
  - attribute columns
    - salience
    - enabled
    - date-effective
    - date-expires
    - non-loop
    - agenda-group
    - activation-group
    - duration
    - timer
    - calendars
    - autofocus
    - look-on-active
    - ruleflow-group
    - dialect
    - negate
- FIELD: entry point
  - condition columns
- FIELD: update engine
  - action column type "set the value of a field"
- FIELD: logically insert
  - action column type "set the value of a field on a new fact"
- FIELD: use row number & reverse order
  - attribute salience
- FIELD: hide column
  - condition columns
  - action columns
    - set value of a field
    - set value of a field on a new fact
    - Retract an existing fact
  - attribute columns
    - salience
    - enabled
    - date-effective
    - date-expires
    - non-loop
    - agenda-group
    - activation-group
    - duration
    - timer
    - calendars
    - autofocus
    - look-on-active
    - ruleflow-group
    - dialect
    - negate


Commits
-------
- Master: https://github.com/droolsjbpm/drools-wb/commit/7c948e1d4651fb8233689409b55c478a63a5d283

- 6.0.x: https://github.com/droolsjbpm/drools-wb/commit/26d4f83189319c1437848f3f2536b5ebdf8db198

Comment 8 Zuzana Krejčová 2013-12-10 16:47:24 UTC
It's pretty much fixed (good job, thanks!), but there are still some minor issues. See list below. 
I'd rather keep it all here, since it is so related and there is still one update not caught (and so I should, probably, return this anyway)..


Updates not caught:
- entry point (condition column)
(There were some cases when I thought at first that some updates are still not caught, but it seems that I've just been too quick for the GUI.)

Updates without information about changed field (just timestamp with author and which column was updated):
- pattern (condition column)
- update engine (set the value of a field)
- everything used with attributes, metadata (there's just 'hide column') and 'delete an existing fact' action column

Incorrect information:
- calculation type (condition column) - values user selects are 'Literal value', 'Formula', 'Predicate'; values Audit log shows are: 1, 3, 5
- fact (set the value of a field) - user chooses value for field 'fact', Audit log shows field labelled 'Bound Variable'
- metadata - Audit log shows: Updated column 'null'

Comment 9 Zuzana Krejčová 2013-12-10 17:03:07 UTC
Please ignore the last 2 paragraphs - Updates without information.. and Incorrect information.. I just noticed I have another BZ for that already (must be the late hour;)). I will repost it there.

Nonetheless, please look at the entry point issue - hopefully, it will now be a very quick fix.

Sorry for the chaos.

Comment 10 Roger Martínez 2013-12-13 18:59:03 UTC
Hi Zuzana,

Fixed. The entry point update event is now catched.

This BZ is related with https://bugzilla.redhat.com/show_bug.cgi?id=996942, so I have done the commits toghehter.

Please note that this fix will be available for next 6.0.X release.

Commits on master
=================

- drools -> https://github.com/droolsjbpm/drools/commit/7c62843d6ad6832f24fd4987307c230ccbdfa749

- drools-wb -> https://github.com/droolsjbpm/drools-wb/commit/64d985a565c02585c0771d2ea8669bb23eee8968

Commits on 6.0.X
================

- drools -> https://github.com/droolsjbpm/drools/commit/1da487614ddd0ee6699a3defd5cb3ff2df005558

- drools-wb -> https://github.com/droolsjbpm/drools-wb/commit/e76ffc10f9c3615aa6ce109e2f6ac597ae1a5b37

Comment 11 Zuzana Krejčová 2014-01-13 17:56:33 UTC
Verified with ER7.