added check for the presence of the substitute-pattern {} in CSVExportModule when multiple features lists are selected (based on the code suggestion of robinschmid from PR#1100, commit ed5aa04e138c9c9f57632f0f1ffa1ba7bd8b40e2)
@@ -141,6 +141,15 @@ public class CSVExportModularTask extends AbstractTask implements ProcessedItems
String plNamePattern = "{}";
boolean substitute = fileName.getPath().contains(plNamePattern);
+ if (!substitute && featureLists.length > 1) {
+ setErrorMessage("""
+ Cannot export multiple feature lists to the same CSV file. Please use "{}" pattern in filename.\
+ This will be replaced with the feature list name to generate one file per feature list.
+ """);
+ setStatus(TaskStatus.ERROR);
+ return;
+ }
+
// Total number of rows
for (ModularFeatureList featureList : featureLists) {
totalTypes += featureList.getNumberOfRows();
