Description
Steps to Reproduce
On a Geneva Patch 8 instance:
- Create Kits table.
- Navigate to System Definition > Tables.
- Click New.
- Create a table with the following values and click Submit:
- Label: Kits
- Name: u_kits
- Extends Table: Hardware
- Create a many-to-many relationship for this Kits table.
- Enter sys_m2m.list in the navigation filter.
- Click New.
-
Enter the following information and then click Create Many to Many.
This creates a table called u_m2m_hardware_kits as a result.
- From table: Kits [u_kits]
- To table: Hardware [cmdb_ci_hardware]
- Activate audit on the Kits table.
- Navigate to System Definition > Dictionary.
- Find the entry for the u_kits table with type = collection.
- Check the Audit check box and click Update.
- Activate audit on u_m2m_hardware_kits table.
- Navigate to System Definition > Dictionary.
- Find the entry for the u_m2m_hardware_kits table with type = collection
- Check the Audit checkbox and click Update.
- Create a new Kits record.
- Navigate to Kits > Kits.
- Click New.
- In the Name field, add "Test Kit" and save the record.
- Open Configure > Related Lists.
- Select Hardware in the slushbucket and click Save.
- In the Hardware related list, click Edit.
- In the Collection list, select the first five records and move them to the Test Kit list and click Save.
- Verify the XML and history of these changes.
-
In the Kits record, right-click the header and select Show XML.
Note that the sys_updated_on = sys_created_on, and sys_mod_count = 0.
-
In the Kits record, right-click the header and select History > List.
Note that there are only updates with an Update number of 0.
-
- Delete the history to re-generate it.
- In the record history, click Delete.
- Navigate back to the Kits record.
-
Right-click on the header and select History > List.
Note that there are now five records with a label of Relation, a type of Relation, and an update number of -1. The relation records appear in the history only if the existing history is deleted and re-created.
Workaround
By default, insertions are not audited for any table. To enable auditing of insertions, set the glide.sys.audit_inserts system property to true.
To cause the many-to-many related list to automatically update, create a business rule to run on the many-to-many table on insert, update, and delete that does one of the following:
- Sets the sys_updated_time of the parent record to the current time, which causes the history set for the parent record to regenerate.
- Delete the history set for the parent record, which forces the history set to regenerate.
Related Problem: PRB744027