Project

General

Profile

Actions

bug #7177

closed

Fix protectedTitleCache for Agents which have no data except the cache

Added by Andreas Kohlbecker over 6 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Tags:

Description

This is important for the phycobank playday

Actions #1

Updated by Andreas Müller about 6 years ago

  • Target version changed from Release 4.13 to Release 4.14
Actions #2

Updated by Andreas Kohlbecker about 6 years ago

  • Status changed from New to Resolved
  • Target version changed from Release 4.14 to Release 4.13

already solved in the production data?

Actions #3

Updated by Andreas Kohlbecker about 6 years ago

  • % Done changed from 0 to 50
Actions #4

Updated by Andreas Kohlbecker about 6 years ago

sql to test


select * from AgentBase a 
    where DTYPE = 'Person'
        and a.lastname is null AND a.firstname is null AND a.initials is NULL 
        AND (a.protectedTitleCache = 0 OR a.protectedCollectorTitleCache  = 0 OR a.protectedNomenclaturalTitleCache = 0)

select * from AgentBase a left join AgentBase_AgentBase a_a on a_a.Team_id = a.id
    where DTYPE = 'Team'
        and a_a.Team_id is null
        AND (a.protectedTitleCache = 0 OR a.protectedCollectorTitleCache  = 0 OR a.protectedNomenclaturalTitleCache = 0)
Actions #5

Updated by Andreas Kohlbecker about 6 years ago

and the query to fix the data:

UPDATE AgentBase a left join AgentBase_AgentBase a_a on a_a.Team_id = a.id
    SET a.protectedTitleCache = 1, a.protectedCollectorTitleCache  = 1, a.protectedNomenclaturalTitleCache = 1
 WHERE 
    DTYPE = 'Team'
    AND a_a.Team_id is null
    AND (a.protectedTitleCache = 0 OR a.protectedCollectorTitleCache  = 0 OR a.protectedNomenclaturalTitleCache = 0)

UPDATE AgentBase a left join AgentBase_AgentBase a_a on a_a.Team_id = a.id
    SET a.protectedTitleCache = 1, a.protectedCollectorTitleCache  = 1, a.protectedNomenclaturalTitleCache = 1
 WHERE 
    DTYPE = 'Person'
    and a.lastname is null AND a.firstname is null AND a.initials is NULL 
    AND (a.protectedTitleCache = 0 OR a.protectedCollectorTitleCache  = 0 OR a.protectedNomenclaturalTitleCache = 0)
Actions #6

Updated by Andreas Kohlbecker about 6 years ago

applied to all databases!

Actions #7

Updated by Andreas Kohlbecker about 6 years ago

  • Tags set to phycobank
  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100
Actions #8

Updated by Andreas Kohlbecker about 6 years ago

  • Project changed from EDIT to PhycoBank
  • Category deleted (data)
  • Target version deleted (Release 4.13)
Actions #9

Updated by Andreas Kohlbecker over 4 years ago

  • Subject changed from Fix protectedTitleCache for Agents wich have no data except the cache to Fix protectedTitleCache for Agents which have no data except the cache
Actions

Also available in: Atom PDF