Actions
bug #7447
openERS: Fix misapplied name issues for E+M common names.
Status:
Resolved
Priority:
Priority11
Assignee:
Category:
data
Target version:
Start date:
Due date:
% Done:
90%
Estimated time:
0:30 h
Severity:
normal
Found in Version:
Description
Fix misapplied name issues for E+M common names.
There are 2 issues:
- BerlinModelCommonNamesImport:341 - Misapplied name for common name was not found related to the accepted taxon. Created new relationship. CommonNameId: xxxx
- BerlinModelCommonNamesImport:316 - MisappliedName not found for misappliedTaxonId 415470; commonNameId: 44
- ~
Also attaching the cn to both taxa and source handling does not yet fully work and should be fixed within this ticket.~ => I did not find a problem here, I checked for 2 records, in both cases 2 common names were created with sources attached and correct nameInSource, so this seems to be fxied
===
For 1 only the relation between the misapplied name and the accepted taxon does not exist. It is unclear why because they in generell seem to exist but are not found by the algorithm which looks into the set of existing misapplied names and tests if the expected misName is contained.
SELECT n.nameId, accn.NameCache acc, n.FullNameCache sourceName, cn.MisNameRefFk misRef, misRef.RefCache,
pt_n.RIdentifier, pt_n.PTNameFk, pt_n.PTRefFk,
cn.*
FROM emCommonName cn
LEFT OUTER JOIN Name accn ON accn.nameId = cn.PTNameFk
LEFT OUTER JOIN Name n ON n.nameId = cn.NameInSourceFk
LEFT OUTER JOIN Reference misRef ON misRef.RefId = cn.MisNameRefFk
LEFT OUTER JOIN PTaxon pt_n ON cn.NameInSourceFk = pt_n.PTNameFk AND cn.MisNameRefFk = pt_n.PTRefFk
WHERE CommonNameId IN (
2280,5358,7869,8056,8057,8230,8237,8238,8287,8304,8310,8354,8372,8396,8410,8473,8506,8536,8543,8550,
8789,8859,8860,9118,9126,9191,9470,9499,9523,9541,9610,9816,9865,9914,10051,10075,10081,10090,10094,
10785,10925,11968,12003,12130,12150,12184,12280,12331,12396,12445,12446,12447,12453,12469,12492,
12495,12498,12506,12510,12514,12658,13041,13325,13404,13406,13556,13667,13721,14122,14175,14655,
17314,17315,17317,17320,17380,17427,17428,17432,17562,17585,17630,137620,141872,142653,142957,143006,
143018,143064,143072,143301,143809,144062,144975,145189,145295,145319,145327,146211,146539,146981,148786,148802,
149389,149662,149774,149808,150389,150751,150831,150841,150959,150996,151006)
ORDER BY cn.CommonNameId, pt_n.RIdentifier
For 2 the relation ship realy does not exist. Need to ask ERS if we shouldn't add it.
SELECT accn.NameCache acc, cn.PTRefFk, n.nameId misNameId, n.FullNameCache misappliedName, cn.MisNameRefFk misRef, misRef.RefCache,
pt_n.RIdentifier, pt_n.PTNameFk, pt_n.PTRefFk,
cn.*
FROM emCommonName cn
LEFT OUTER JOIN Name accn ON accn.nameId = cn.PTNameFk
LEFT OUTER JOIN Name n ON n.nameId = cn.NameInSourceFk
LEFT OUTER JOIN Reference misRef ON misRef.RefId = cn.MisNameRefFk
LEFT OUTER JOIN PTaxon pt_n ON cn.NameInSourceFk = pt_n.PTNameFk AND cn.MisNameRefFk = pt_n.PTRefFk
WHERE CommonNameId IN (
44,9861,9882,12178,17318,17327,17446,17447,151113)
ORDER BY CommonNameId, pt_n.RIdentifier;
SELECT *
FROM PTaxon pt
WHERE pt.RIdentifier IN (415470);
SELECT *
FROM RelPTaxon rel
WHERE rel.PTNameFk1 = 7521920 AND rel.PTRefFk1 = 6593;
Related issues
Actions