Skip to content
Snippets Groups Projects
Commit 3e924a35 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

Merge branch 'sales_pn_1077380_inactive_salesprojectphase' into '2021.0'

Sales pn 1077380 inactive salesprojectphase

See merge request xrm/basic!854
parents a9416133 592a17b0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment