diff --git a/entity/SalesprojectPhase_entity/recordcontainers/jdito/contentProcess.js b/entity/SalesprojectPhase_entity/recordcontainers/jdito/contentProcess.js index c66d85815d3f52def5b26491e9e6ccaff853f137..e957ab3b90b5a27c1b053e01e4eb4c284e1750de 100644 --- a/entity/SalesprojectPhase_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/SalesprojectPhase_entity/recordcontainers/jdito/contentProcess.js @@ -10,7 +10,7 @@ import("Util_lib"); var res = []; var ids = vars.get("$local.idvalues"); var disabledPhases = JSON.parse(vars.get("$param.DisabledPhases_param")) || []; -var steps = KeywordUtils.getEntryNamesAndIdsByContainer($KeywordRegistry.salesprojectPhase()); +var steps = KeywordUtils.getEntryNamesAndIdsByContainer($KeywordRegistry.salesprojectPhase(), null, true); var selected = vars.exists("$param.CurrentPhase_param") && vars.get("$param.CurrentPhase_param"); // filter only for steps reqested by the system diff --git a/process/Keyword_lib/process.js b/process/Keyword_lib/process.js index 3f33564d881f46aa07e062522eb22d7a89dbbea8..4d7f8120f6aea55a909bf5caa13530687fbf07d1 100644 --- a/process/Keyword_lib/process.js +++ b/process/Keyword_lib/process.js @@ -201,16 +201,18 @@ KeywordUtils.getEntryNamesByContainer = function(pContainerName, pLocale) * * @param {String} pContainerName name of the keyword container for filtering * @param {String} [pLocale=locale depending on current client/servercontext] Language-value for translations +* @param {boolean=} pOnlyActive if true only active keywords will be returned * * @return {String[]} 2D-Array in the form of [[id1, translatedTitle1], [idN, translatedTitleN]] */ -KeywordUtils.getEntryNamesAndIdsByContainer = function(pContainerName, pLocale) +KeywordUtils.getEntryNamesAndIdsByContainer = function(pContainerName, pLocale, pOnlyActive) { //TODO: this can be propably removed when the "Salesproject_entity.REASONS.dropDownProcess.js" is replaced by a consumer var list = newSelect("AB_KEYWORD_ENTRY.KEYID, AB_KEYWORD_ENTRY.TITLE") .from("AB_KEYWORD_ENTRY") .join("AB_KEYWORD_CATEGORY", "AB_KEYWORD_ENTRY.AB_KEYWORD_CATEGORY_ID = AB_KEYWORD_CATEGORY.AB_KEYWORD_CATEGORYID") .where("AB_KEYWORD_CATEGORY.NAME", pContainerName) + .andIfSet("AB_KEYWORD_ENTRY.ISACTIVE", pOnlyActive ? "1" : null) .orderBy("AB_KEYWORD_ENTRY.SORTING asc, AB_KEYWORD_ENTRY.TITLE asc") .table();