diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/QAEventConverter.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/QAEventConverter.java index 6db4e52bb9c0..0cb73d94e318 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/QAEventConverter.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/converter/QAEventConverter.java @@ -8,6 +8,8 @@ package org.dspace.app.rest.converter; import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Locale; import javax.annotation.PostConstruct; import com.fasterxml.jackson.core.JsonProcessingException; @@ -66,7 +68,8 @@ public QAEventRest convert(QAEvent modelObject, Projection projection) { rest.setTitle(modelObject.getTitle()); rest.setTopic(modelObject.getTopic()); rest.setEventDate(modelObject.getLastUpdate()); - rest.setTrust(new DecimalFormat("0.000").format(modelObject.getTrust())); + DecimalFormat decimalFormat = new DecimalFormat("0.000", new DecimalFormatSymbols(Locale.ENGLISH)); + rest.setTrust(decimalFormat.format(modelObject.getTrust())); // right now only the pending status can be found in persisted qa events rest.setStatus(modelObject.getStatus()); return rest; diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/QAEventRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/QAEventRestRepositoryIT.java index 53263f08d112..3f4f5b7c76d2 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/QAEventRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/QAEventRestRepositoryIT.java @@ -897,7 +897,7 @@ public void createQAEventByCorrectionTypeWithdrawnRequestTest() throws Exception .andExpect(jsonPath("$.source", is(DSPACE_USERS_SOURCE))) .andExpect(jsonPath("$.title", is(publication.getName()))) .andExpect(jsonPath("$.topic", is("REQUEST/WITHDRAWN"))) - // .andExpect(jsonPath("$.trust", is("1,000"))) + .andExpect(jsonPath("$.trust", is("1.000"))) .andExpect(jsonPath("$.status", is("PENDING"))); getClient(adminToken).perform(get("/api/core/items/" + publication.getID())) @@ -963,7 +963,7 @@ public void createQAEventByCorrectionTypeReinstateRequestTest() throws Exception .andExpect(jsonPath("$.source", is(DSPACE_USERS_SOURCE))) .andExpect(jsonPath("$.title", is(publication.getName()))) .andExpect(jsonPath("$.topic", is("REQUEST/REINSTATE"))) - // .andExpect(jsonPath("$.trust", is("1,000"))) + .andExpect(jsonPath("$.trust", is("1.000"))) .andExpect(jsonPath("$.status", is("PENDING"))); getClient(adminToken).perform(get("/api/core/items/" + publication.getID()))