ref #9772: fix collector and number
authorKatja Luther <k.luther@bgbm.org>
Mon, 4 Oct 2021 10:25:53 +0000 (12:25 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 4 Oct 2021 10:25:53 +0000 (12:25 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/SpecimenColumnPropertyAccessor.java

index c81035031063f51f60d967e5db52fa93a54b5169..437ebeaeca5f04a6ed1a9b5b62969415013f0c36 100644 (file)
@@ -12,6 +12,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.nebula.widgets.nattable.data.IColumnPropertyAccessor;
 
 import eu.etaxonomy.cdm.api.service.dto.RowWrapperDTO;
@@ -48,11 +49,20 @@ public class SpecimenColumnPropertyAccessor implements IColumnPropertyAccessor<O
                     return rowWrapper.getTaxonNode();
                 }
             case 1:
-                if (rowWrapper.getFieldUnit() != null){
-                    return rowWrapper.getFieldUnit().getTitleCache();
-                }else{
-                    return "no information";
-                }
+                if (rowWrapper.getSpecimenDto() != null){
+                       if (StringUtils.isBlank(rowWrapper.getSpecimenDto().getCollectorsString())){
+                               if (rowWrapper.getFieldUnit() != null){
+                                       return rowWrapper.getFieldUnit().getTitleCache();
+                               }else{
+                                       return "no information";
+                               }
+                       }
+                    return rowWrapper.getSpecimenDto().getCollectorsString();
+                }else if (rowWrapper.getFieldUnit() != null){
+                               return rowWrapper.getFieldUnit().getTitleCache();
+                       }else{
+                               return "no information";
+                       }
             case 2:
                 return rowWrapper.getIdentifier();
             case 3: