bug #9047
closedSearch does not return orphaned synonyms
50%
Description
A name which is currently only used in a synonym which has no accepted taxon (which is dirty data but exists) is currently not found in the TaxEditor search.
This needs to be fixed to avoid creation of duplicates when names are not found and therefore are expected not to exist yet.
Updated by Andreas Müller over 3 years ago
- Status changed from New to In Progress
Updated by Andreas Müller over 3 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|ea076318550ed467dd48afce88d5f3929ba20d99.
Updated by Andreas Müller over 3 years ago
- Category changed from taxeditor to cdmlib
- Assignee changed from Andreas Müller to Katja Luther
I tested on rem_conf_am with "Orphaned syn*" . It seems to work. I change category as this is a general cdmlib issue.
Please review (including code).
Updated by Katja Luther over 3 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Katja Luther to Andreas Müller
I think the left join is not necessary because only the id of the synonyms/taxa are collected in the sql query, but the query works as expected.
Updated by Andreas Müller over 3 years ago
- Status changed from Feedback to Resolved
- Assignee changed from Andreas Müller to Katja Luther
Katja Luther wrote:
I think the left join is not necessary because only the id of the synonyms/taxa are collected in the sql query, but the query works as expected.
The left join is necessary to allow further optional filtering on the taxon itself. This is currently only the case for setting the "published" filter. In this case also the accepted taxon needs to be published to be on the safe side (in case someone forgot to set the flag also for all synonyms).
I agree that for orphaned synonyms it is maybe not necessary to also check the accepted taxon but handling this separately will make the query more complex and at the same time orphaned taxa should be an exception so it is maybe not really worth handling them explicitly and making the query more complicated then it is already.
Updated by Katja Luther over 3 years ago
Andreas Müller wrote:
Katja Luther wrote:
I think the left join is not necessary because only the id of the synonyms/taxa are collected in the sql query, but the query works as expected.
The left join is necessary to allow further optional filtering on the taxon itself. This is currently only the case for setting the "published" filter. In this case also the accepted taxon needs to be published to be on the safe side (in case someone forgot to set the flag also for all synonyms).
I agree that for orphaned synonyms it is maybe not necessary to also check the accepted taxon but handling this separately will make the query more complex and at the same time orphaned taxa should be an exception so it is maybe not really worth handling them explicitly and making the query more complicated then it is already.
ah, you are right, but then I think it should be "LEFT JOIN s.acceptedTaxon as t".
Updated by Andreas Müller over 3 years ago
Katja Luther wrote:
ah, you are right, but then I think it should be "LEFT JOIN s.acceptedTaxon as t".
no the t is taken from the main query where the FROM Taxon is replaced by this subquery. Tests do run so this is definetely not an issue.
Updated by Katja Luther over 3 years ago
- Status changed from Resolved to Closed
- Assignee changed from Katja Luther to Andreas Müller