Project

General

Profile

Actions

task #9291

closed

Clear all unnecesary TypeDesignation.citation entities and citationDetails

Added by Andreas Kohlbecker over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Highest
Category:
data
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Tags:

Description

This ticket should be solved after #9290 is being released and deployed to phycobank

This is the query to which has been used to create the report for #9290. The update statement can be based on that:


SELECT
    tn.uuid as TaxonName_uuid, tn.nameCache as TaxonName_nameCache, 
    tn_r.titleCache as TaxonName_nomRef, tn_r.refType as TaxonName_nomRef_type, tn_r.uuid as TaxonName_nomRef_uuid, 
    ts.titleCache as TypeStatus_label, ts.id as TypeStatus_id, 
    tdb_r.titleCache as TypeDesignation_citation, tdb_r.refType as TypeDesignation_citation_type, tdb_r.uuid as TypeDesignation_citation_uuid, 
    tdb.uuid as TypeDesignation_uuid 
FROM TypeDesignationBase tdb
LEFT JOIN DefinedTermBase ts ON tdb.typeStatus_id = ts.id
JOIN TaxonName_TypeDesignationBase tntdb on tdb.id = tntdb.typedesignations_id 
JOIN TaxonName tn on tn.id = tntdb.TaxonName_id
LEFT JOIN Reference tn_r on tn_r.id = tn.nomenclaturalReference_id 
LEFT JOIN Reference tdb_r on tdb_r.id = tdb.citation_id 
WHERE tdb.citation_id IS NOT NULL 
    AND ts.id NOT IN (853 ,839 ,840 ,843 ,850 ,846 ,852 ,847 ,839 ,2108 ,2110 ,2111 ,2112) 
    AND tdb.citation_id <> tn.nomenclaturalReference_id 
ORDER BY tdb_r.uuid 

Related issues

Related to EDIT - bug #9290: stop setting Registration.citation as citation for TypeDesignations in all type editors by defaultClosedAndreas Kohlbecker

Actions
Actions

Also available in: Atom PDF