Commit 624a6991 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1509-minervanet-error-report-303' into 'master'

Resolve "MINERVANET - Error Report 303"

Closes #1509

See merge request !1315
parents f908123f 94fb7449
Pipeline #43221 passed with stage
in 23 minutes and 19 seconds
......@@ -13,6 +13,8 @@ minerva (16.0.0~beta.1) stable; urgency=medium
* Bug fix: there was issue when upgrading backgrounds in admin panel (#1514)
* Bug fix: there was issue when editing and saving data overlay (#1494)
* Bug fix: problem with adding comments (#1495)
* Bug fix: project with invalid data might cause problem on
create/update/delete (#1509)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 9 Jun 2021 15:00:00 +0200
......@@ -28,8 +30,8 @@ minerva (16.0.0~beta.0) stable; urgency=medium
if the information is duplicated in sbgn data (#1358)
* Small improvement: glyph quality is improved (#1458)
* Small improvement: search results are group by diagram (#1451)
* Small improvement: "Failed to fetch" errors are reported in a way that suggest
retrying before submitting error report (#738)
* Small improvement: "Failed to fetch" errors are reported in a way that
suggest retrying before submitting error report (#738)
* Small improvement: reverse search pop-up reorganized (#1366)
* Bug fix: arrows without a "process" box had an irregular empty space in
their lines (#1471)
......@@ -46,12 +48,14 @@ minerva (16.0.0~alpha.1) stable; urgency=medium
* Backward incompatibility: deprecated columns in data overlays are no longer
supported (#958)
* Backward incompatibility: comment does not contain name anymore (#1070)
* Backward incompatibility: publication pagination API slightly changed (#1007)
* Backward incompatibility: publication pagination API slightly changed
(#1007)
* Backward incompatibility: elements in data overlay are returned differently
when using data overlay API (#1007)
* Improvement: performance improved - map is available immediatelly after
tomcat starts (#1007)
* Improvement: minerva does not require huge amounts of memory anymore (#1007)
* Improvement: minerva does not require huge amounts of memory anymore
(#1007)
* Improvement: data overlay allows for multiple hits per element (#1007)
* Small improvement: "dbSNP", "IMGT HLA", "PMC", "Complex Portal" identifiers
are supported (#1452, #1450, #1420)
......
......@@ -1219,7 +1219,7 @@ public class ProjectService implements IProjectService {
return entry;
}
private void fixProjectIssues(Project project) {
void fixProjectIssues(Project project) {
ObjectValidator validator = new ObjectValidator();
List<Pair<Object, String>> issues = validator.getValidationIssues(project);
if (issues.size() > 0) {
......@@ -1229,7 +1229,7 @@ public class ProjectService implements IProjectService {
Object left = pair.getLeft();
if (left instanceof BioEntity) {
BioEntity bioEntity = (BioEntity) left;
entry.setMapName(bioEntity.getModel().getName());
entry.setMapName(bioEntity.getModelData().getName());
entry.setObjectClass(bioEntity.getClass().getSimpleName());
entry.setObjectIdentifier(bioEntity.getElementId());
} else if (left instanceof ModelData) {
......
package lcsb.mapviewer.services.impl;
import static org.junit.Assert.*;
import static org.mockito.Mockito.CALLS_REAL_METHODS;
import java.io.*;
import java.nio.charset.StandardCharsets;
......@@ -704,4 +705,16 @@ public class ProjectServiceTest extends ServiceTestFunctions {
assertEquals(0, entries.size());
}
@Test
public void testFixProjectIssuesWithElementWithoutModel() throws Exception {
ProjectService service = Mockito.mock(ProjectService.class, CALLS_REAL_METHODS);
Project project = new Project();
ModelData model = new ModelData();
GenericProtein protein = new GenericProtein("1");
project.addModel(model);
model.addElement(protein);
service.fixProjectIssues(project);
assertTrue(project.getLogEntries().size() > 0);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment