Commit 60a0608b authored by Romain Bioteau's avatar Romain Bioteau Committed by GitHub

fix(import) recompute configId in a migration step (#1585)

Closes BS-19306
parent 810cdf77
......@@ -14689,5 +14689,8 @@
<releases xmi:id="_z5RnUKwvEeiFZ5S8g2gj5Q" date="2018-08-30T11:43:27.494+0200" label="7.8.0-002">
<changes xsi:type="history:MigrationChange" xmi:id="_z5RnUawvEeiFZ5S8g2gj5Q" migration="org.bonitasoft.studio.migration.custom.migration.connector.UpdateRestConnectorVersionTo106"/>
</releases>
<releases xmi:id="_7NF0QDj6Eem-ZO25_WoPnQ" date="2019-02-25T10:43:27.494+0100" label="7.8.3-001">
<changes xsi:type="history:MigrationChange" xmi:id="_7NF0QTj6Eem-ZO25_WoPnQ" migration="org.bonitasoft.studio.migration.custom.migration.UpdateConfigurationId"/>
</releases>
<releases xmi:id="_15TmyGnREeaTLbmqFFisdA"/>
</history:History>
......@@ -23,7 +23,7 @@ public class ConfigurationIdProvider implements IConfigurationIdProvider {
@Override
public Object getConfigurationId(MainProcess diagram) {
return get(diagram.getName(), diagram.getBonitaModelVersion(), diagram.getBonitaVersion());
return get(diagram.getBonitaModelVersion(), diagram.getBonitaVersion());
}
@Override
......@@ -33,18 +33,18 @@ public class ConfigurationIdProvider implements IConfigurationIdProvider {
diagram.getBonitaVersion());
}
protected String get(String diagramName, String modelVersion, String bonitaVersion) {
return diagramName + modelVersion + bonitaVersion;
protected String get(String modelVersion, String bonitaVersion) {
return modelVersion + bonitaVersion;
}
@Override
public boolean isConfigurationIdValid(Object configId, String diagramName, String modelVersion, String bonitaVersion) {
return configId != null && configId.toString().equals(get(diagramName, modelVersion, bonitaVersion));
return configId != null && configId.toString().endsWith(get(modelVersion, bonitaVersion));
}
@Override
public Object getConfigurationId(String diagramName, String bonitaModelVersion, String bonitaVersion) {
return get(diagramName, bonitaModelVersion, bonitaVersion);
return get(bonitaModelVersion, bonitaVersion);
}
}
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