fix related to #8135: count properly the filters applied in the parameters
This commit is contained in:
parent
191855d64d
commit
2ad18e5899
|
@ -323,9 +323,13 @@ export class IndicatorUtils {
|
|||
let replacedValue = indicatorPath.parameters[key];
|
||||
if (startYear && key == "start_year") {
|
||||
replacedValue = (replacedValue < startYear) ? startYear : replacedValue;
|
||||
//if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied
|
||||
indicatorPath.filtersApplied++;
|
||||
}
|
||||
if (endYear && key == "end_year") {
|
||||
replacedValue = (replacedValue > endYear) ? endYear : replacedValue;
|
||||
//if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied
|
||||
indicatorPath.filtersApplied++;
|
||||
}
|
||||
if (key == "index_id") {
|
||||
replacedValue = stakeholder.index_id;
|
||||
|
@ -336,10 +340,7 @@ export class IndicatorUtils {
|
|||
if (key == "index_shortName") {
|
||||
replacedValue = stakeholder.index_shortName.toLowerCase();
|
||||
}
|
||||
//if there is a parameter that is filtered and the value of the parameter changes, count the filter as applied
|
||||
if(replacedValue !=indicatorPath.parameters[key]){
|
||||
indicatorPath.filtersApplied++;
|
||||
}
|
||||
|
||||
replacedUrl = replacedUrl.split(ChartHelper.prefix + key + ChartHelper.suffix).join(replacedValue)
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue