diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod index eae6cd44e8f1692d1b912ce796b056ca0929fcfa..d16972d68d7e010043bb93dde525b89d94781b17 100644 --- a/entity/Employee_entity/Employee_entity.aod +++ b/entity/Employee_entity/Employee_entity.aod @@ -306,6 +306,9 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>SHORT_UID</name> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -366,6 +369,9 @@ <name>ROLE_FILTER.value</name> <isFilterable v="true" /> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>SHORT_UID.value</name> + </jDitoRecordFieldMapping> </recordFieldMappings> <filterExtensions> <filterExtension> diff --git a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js index 870d945fe51dbcd655365f47a98c1f11fbb959ad..4d17f73bab9abfae6db2b2ec49a190b379fcabd0 100644 --- a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js @@ -92,6 +92,7 @@ for (let i = 0, l = users.length; i < l; i++) { users[i][9] = nameMap[users[i][8]] || ""; users[i][12] = ""; + users[i][13] = EmployeeUtils.sliceUserId(users[i][0]); } var order = vars.get("$local.order"); diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index bf1f322fbaca2b2edc0e0183668639e1d9e67968..9afb0bf19c54caa92e5f90c258559db60bdfccb8 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -1,3 +1,4 @@ +import("Employee_lib"); import("KeywordData_lib"); import("Context_lib"); import("system.util"); @@ -158,6 +159,9 @@ AttributeUtil.getPossibleListValues = function (pAttributeId, pAttributeType, pI if (module) { var uid = "#UID"; + if (module == "Employee_entity") + uid = "SHORT_UID"; + var title = "#CONTENTTITLE"; var config = entities.createConfigForLoadingRows() .entity(module) @@ -782,6 +786,9 @@ $AttributeTypes.OBJECTSELECTION = { { if (pValue) { + if (pModule == "Employee_entity") + pValue = EmployeeUtils.prefixUserId(pValue); + var title = "#CONTENTTITLE"; var config = entities.createConfigForLoadingRows() .entity(pModule) @@ -794,6 +801,7 @@ $AttributeTypes.OBJECTSELECTION = { }, getDropDownDefinitions : function () { + // TODO: use loadEntity from context_entity var dropDownList = []; project.getDataModels(project.DATAMODEL_KIND_ENTITY).forEach( function (entity) diff --git a/process/Employee_lib/process.js b/process/Employee_lib/process.js index 8b2729142c99c08b40186bf5b9aae89134bc8958..3702cc9561f22169e09ec71ea5f83587abb48934 100644 --- a/process/Employee_lib/process.js +++ b/process/Employee_lib/process.js @@ -49,6 +49,11 @@ EmployeeUtils.sliceUserId = function (pUserId) return pUserId.slice(-36); } +EmployeeUtils.prefixUserId = function (pUserId) +{ + return "_____USER_" + pUserId; +} + /** * generates a username from the firstname and lastname with the given structure *