You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Batch Edit can silently unlink tree records from relationships where a record is associated to a tree node at a higher rank than the highest rank included in the Query.
For example, consider a CollectionObject determined to a Taxon node at the Family level.
If the Query used to initiate the BatchEdit includes the aforementioned CollectionObject record and only included ranks ranks at a strictly lower than Family level (Genus, Species, Subspecies, etc.), then when the Batch Edit Data Set is committed then Specify will unlink the Taxon from the Determination with no indication to the user.
unlinking_issue.mov
While not shown in the above video, the CollectionObject with the Determination which was included in the ranks of the Query was not modified.
To Reproduce
Steps to reproduce the behavior:
Add a Determination to one or more CollectionObject records and assign the Determination's Taxon to a rank higher than the lowest rank in the tree
Create a Query that will return one or more of the CollectionObject records. In the Query, include at least one Taxon rank and ensure all Taxon ranks in the Query are strictly lower than the determined rank of the CollectionObject records
Click on the "Batch Edit" button on the Query Results
(Optional) Validate the Batch Edit Data Set and see that no changes are detected
Commit the Batch Edit Data Set
View the Determinations on the CollectionObject records and see that their Taxon and PreferredTaxon relationships have been unlinked
Expected behavior
Specify should probably do one or more of:
Notify the user that a change is being made to the record which is being unlinked
Include all tree ranks in the Batch Edit Data Set
Handle this case explicitly and make no changes to the record if no changes are made within the Data Set (which is likely the expected behavior)
Please fill out the following information manually:
Additional context
Discovered by investigation into #8434, so technically first reported by @urban011
The Taxon unlinking is still recorded by the Audit Log. Below is a query used to retrieve Audit Log information, as well as the Audit Log after the Batch Edit Commit shown in the above video.
SELECTlog.SpAuditLogID, log.Action, log.ParentRecordId, log.ParentTableNum, log.RecordId, log.TableNum, field.FieldName, field.NewValue, field.OldValue, log.TimestampCreatedFROM spauditlog log LEFT OUTER JOIN spauditlogfield field ONlog.SpAuditLogID=field.SpAuditLogIDORDER BY spauditlogid DESCLIMIT20;
+--------------+--------+----------------+----------------+----------+----------+------------------------+----------+--------------------------------------+---------------------+
| SpAuditLogID | Action | ParentRecordId | ParentTableNum | RecordId | TableNum | FieldName | NewValue | OldValue | TimestampCreated |
+--------------+--------+----------------+----------------+----------+----------+------------------------+----------+--------------------------------------+---------------------+
| 414781 | 1 | 4 | 23 | 69542 | 9 | taxon_id | NULL | 250 | 2026-08-28 09:19:20 |
| 414780 | 0 | 181 | 517 | 2894 | 518 | NULL | NULL | NULL | 2026-08-28 09:18:40 |
^^^
The directly above row is part of the audit for the creation of the Batch Edit Query.
The first row is the Audit for the Batch Edit operation
Describe the bug
Batch Edit can silently unlink tree records from relationships where a record is associated to a tree node at a higher rank than the highest rank included in the Query.
For example, consider a CollectionObject determined to a Taxon node at the Family level.
If the Query used to initiate the BatchEdit includes the aforementioned CollectionObject record and only included ranks ranks at a strictly lower than Family level (Genus, Species, Subspecies, etc.), then when the Batch Edit Data Set is committed then Specify will unlink the Taxon from the Determination with no indication to the user.
unlinking_issue.mov
While not shown in the above video, the CollectionObject with the Determination which was included in the ranks of the Query was not modified.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Specify should probably do one or more of:
Please fill out the following information manually:
Additional context
Discovered by investigation into #8434, so technically first reported by @urban011
The Taxon unlinking is still recorded by the Audit Log. Below is a query used to retrieve Audit Log information, as well as the Audit Log after the Batch Edit Commit shown in the above video.