Skip to content
Snippets Groups Projects
Commit d72d37c7 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

Merge branch 'develop' into feature/vipsutv-405-observation-time-series

parents 65d3ad81 585d6d89
No related branches found
No related tags found
1 merge request!173ObservationDataSchema for eplevikler and ObservationTimeSeries
...@@ -471,7 +471,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse ...@@ -471,7 +471,7 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
@Column(name = "observation_data") @Column(name = "observation_data")
@Override @Override
public String getObservationData() { public String getObservationData() {
return observationData; return this.observationData != null && this.observationData.replaceAll("\"", "").trim().length() > 0 ? this.observationData : null;
} }
/** /**
......
...@@ -276,6 +276,10 @@ public class PointOfInterest implements Serializable, Comparable { ...@@ -276,6 +276,10 @@ public class PointOfInterest implements Serializable, Comparable {
{ {
this.properties.put("pointOfInterestTypeId", this.getPointOfInterestTypeId()); this.properties.put("pointOfInterestTypeId", this.getPointOfInterestTypeId());
} }
if(this.properties.get("pointOfInterestName") == null)
{
this.properties.put("pointOfInterestName", this.getName());
}
return this.properties; return this.properties;
} }
......
...@@ -287,7 +287,9 @@ public class BarkbeetleBean { ...@@ -287,7 +287,9 @@ public class BarkbeetleBean {
em.createNativeQuery("DELETE FROM barkbeetle.season_trapsite_bivolt WHERE season_trapsite_id = :seasonTrapsiteId") em.createNativeQuery("DELETE FROM barkbeetle.season_trapsite_bivolt WHERE season_trapsite_id = :seasonTrapsiteId")
.setParameter("seasonTrapsiteId", seasonTrapsiteId) .setParameter("seasonTrapsiteId", seasonTrapsiteId)
.executeUpdate(); .executeUpdate();
em.remove(stToDelete); em.createNativeQuery("DELETE FROM barkbeetle.season_trapsite WHERE season_trapsite_id = :seasonTrapsiteId")
.setParameter("seasonTrapsiteId", seasonTrapsiteId)
.executeUpdate();
return true; return true;
} }
......
...@@ -60,7 +60,7 @@ import org.locationtech.jts.geom.Point; ...@@ -60,7 +60,7 @@ import org.locationtech.jts.geom.Point;
public class BarkbeetleController extends HttpServlet { public class BarkbeetleController extends HttpServlet {
// Due to version controls of PDF files, we keep the file names globally updated here // Due to version controls of PDF files, we keep the file names globally updated here
public final static String FILENAME_INSTRUKS_REGISTRANTER = "Instruks_registranter_i_Barkbilleovervakingen_2024-03-04.pdf"; public final static String FILENAME_INSTRUKS_REGISTRANTER = "Instruks_registranter_i_Barkbilleovervakingen_2024-04-03.pdf";
public final static String FILENAME_INSTRUKS_BARKBILLEFYLKESKONTAKTER = "Instruks_Barkbillefylkeskontakter_2024-03-04.pdf"; public final static String FILENAME_INSTRUKS_BARKBILLEFYLKESKONTAKTER = "Instruks_Barkbillefylkeskontakter_2024-03-04.pdf";
public final static String FILENAME_KJENN_IGJEN_ANGREP = "Kjenn_igjen_angrep_stor_granbarkbille_2022-04-25.pdf"; public final static String FILENAME_KJENN_IGJEN_ANGREP = "Kjenn_igjen_angrep_stor_granbarkbille_2022-04-25.pdf";
......
...@@ -33,7 +33,7 @@ public class HierarchyCategoryLocaleNames { ...@@ -33,7 +33,7 @@ public class HierarchyCategoryLocaleNames {
public String getName(Integer hierarchyCategoryId) public String getName(Integer hierarchyCategoryId)
{ {
return this.nameMap.get(hierarchyCategoryId); return this.nameMap.get(hierarchyCategoryId) != null ? this.nameMap.get(hierarchyCategoryId) : "";
} }
public List<Integer> getHierarchyCategoryIds() public List<Integer> getHierarchyCategoryIds()
......
...@@ -447,8 +447,9 @@ ...@@ -447,8 +447,9 @@
</#if> </#if>
var cropList = [ var cropList = [
<#if ! observation.observationId?has_content || user.isSuperUser() || user.isOrganizationAdmin()> <#if ! observation.observationId?has_content || user.isSuperUser() || user.isOrganizationAdmin()>
{organismId: -10, displayName: "${i18nBundle.missingInDatabase}", hierarchyCategoryId: -1},
<#list allCrops as cropOrganism> <#list allCrops as cropOrganism>
{organismId: ${cropOrganism.organismId}, displayName: "${cropOrganism.getLocalName(currentLocale.language)!""} (${cropOrganism.latinName!""}) ${hierarchyCategories.getName(cropOrganism.hierarchyCategoryId)?upper_case}", hierarchyCategoryId: ${cropOrganism.hierarchyCategoryId}}<#sep>, {organismId: ${cropOrganism.organismId?c}, displayName: "${cropOrganism.getLocalName(currentLocale.language)!""} (${cropOrganism.latinName!""}) ${hierarchyCategories.getName(cropOrganism.hierarchyCategoryId)?upper_case}", hierarchyCategoryId: ${cropOrganism.hierarchyCategoryId!"-1"}}<#sep>,
</#list> </#list>
<#else> <#else>
<#list allCrops as cropOrganism> <#list allCrops as cropOrganism>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment