Project

General

Profile

bug #8790

Update measurement units for existing quantitative data missing a unit

Added by Andreas Müller 10 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Highest
Category:
data
Target version:
-
Start date:
12/20/2019
Due date:
% Done:

0%

Severity:
critical
Found in Version:
Tags:

Description

This is how to find them:

SELECT f.id featureId, f.titleCache, mu.id unitId, mu.titleCache unit,  deb.*
FROM DescriptionElementBase deb INNER JOIN DefinedTermBase f ON f.id = deb.feature_id
LEFT OUTER JOIN DefinedTermBase_MeasurementUnit MN ON MN.feature_id = f.id
LEFT OUTER JOIN DefinedTermBase mu ON mu.id = MN.recommendedmeasurementunits_id
WHERE deb.DTYPE = 'QuantitativeData' AND deb.unit_id IS NULL AND mu.id IS NOT NULL   //AND deb.unit_id <> mu.id  
ORDER BY f.id

For updating per feature

UPDATE DescriptionElementBase deb
SET deb.unit_id = xxx
WHERE deb.feature_id = yyy

Beside fixing immediately we should also have an update script.


Related issues

Related to Edit - bug #8791: Measurement units are not assigned to quantitative data in matrix Closed 12/20/2019

History

#1 Updated by Andreas Müller 10 months ago

  • Related to bug #8791: Measurement units are not assigned to quantitative data in matrix added

#2 Updated by Andreas Müller 9 months ago

  • Status changed from New to In Progress
  • Target version changed from Release 5.12 to Release 5.13

#3 Updated by Andreas Müller 6 months ago

  • Status changed from In Progress to Feedback

still needs to be done

#4 Updated by Andreas Müller 6 months ago

  • Description updated (diff)

#5 Updated by Andreas Müller 6 months ago

  • Description updated (diff)

#6 Updated by Andreas Müller 6 months ago

  • Description updated (diff)
  • Status changed from Feedback to Closed
  • Target version deleted (Release 5.13)

I did not write a script but all data was updated on production. Updates were needed on additivity_ontology, caryo_spp and bupleurum (and caryo_AM)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)