Skip to content
Snippets Groups Projects
Commit a81b4f9c authored by a.schindlbeck's avatar a.schindlbeck
Browse files

merged origin/master into CalBranchLocal

parents 9204e2a2 d6881bcd
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 20 deletions
......@@ -60,6 +60,11 @@
<groupable v="true" />
<valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/context_name/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>DATE</name>
<title>Date</title>
<contentType>DATE</contentType>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......@@ -71,6 +76,7 @@
<element>TARGET_ID.value</element>
<element>TARGET_CONTEXT.value</element>
<element>TITLE.value</element>
<element>DATE.value</element>
</recordFields>
</jDitoRecordContainer>
</recordContainers>
......
......@@ -11,14 +11,15 @@ if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"
var contextList = JSON.parse(vars.getString("$param.ObjectType_param"));
contextList.forEach(function (context)
{
var data = db.table(ContextUtils.getContextDataSql(context, vars.get("$param.ObjectRowId_param")));
var data = db.table(ContextUtils.getContextDataSql(context, vars.get("$param.ObjectRowId_param"), true));
data.forEach(function (row)
{
var record = [];
record[0] = util.getNewUUID();
record[1] = row[0];
record[2] = context;
record[3] = row[1];
record[0] = util.getNewUUID(); // UID
record[1] = row[0]; // TARGET_ID
record[2] = context; // TARGET_CONTEXT
record[3] = row[1]; // TITLE
record[4] = row[2]; //DATE
resultList.push(record);
});
......
......@@ -2,4 +2,4 @@ import("system.result");
import("system.vars");
import("Contact_lib")
result.object(ContactUtils.getRelationType(vars.get("$field.CONTACTID"), vars.get("$field.PERSON_ID"), vars.get("$field.ORGANISATION_ID")));
\ No newline at end of file
result.object(ContactUtils.getContactType(vars.get("$field.CONTACTID"), vars.get("$field.PERSON_ID"), vars.get("$field.ORGANISATION_ID")));
\ No newline at end of file
import("system.result");
import("Contact_lib")
result.string(ContactUtils.getFullRelationString());
\ No newline at end of file
result.string(ContactUtils.getFullContactString());
\ No newline at end of file
......@@ -48,13 +48,17 @@
<dependency>
<name>dependency</name>
<entityName>Organisation_entity</entityName>
<fieldName>Organisations</fieldName>
<fieldName>WithPersonIdFilter</fieldName>
</dependency>
<children>
<entityParameter>
<name>WithPrivate_param</name>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisations/children/withprivate_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>ExcludeOrganisationsByPersonId</name>
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisations/children/excludeorganisationsbypersonid/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
......
......@@ -8,6 +8,12 @@ import("Sql_lib");
var personId = vars.get("$field.PERSON_ID");
var organisationId = ProcessHandlingUtils.getOnValidationValue("$field.ORGANISATION_ID");
//workaround for organisationId: $local.value will return the name of the organisation which is not what we want
//but the field already contains the changed value; so let's load the field instead of the $local.value-variable
//this is a bug within the ADITO-kernel
//TODO: change the workaround behaviour when $local.value is retrieved correct
organisationId = vars.get("$field.ORGANISATION_ID")
if (personId && organisationId)
{
var alreadyExistantContactId = db.cell(SqlCondition.begin()
......@@ -15,5 +21,5 @@ if (personId && organisationId)
.andPrepare("CONTACT.ORGANISATION_ID", organisationId)
.buildSql("select CONTACT.CONTACTID from CONTACT"));
if (alreadyExistantContactId != "")
result.string(translate.text("The combination of person and organisation does already exist and can not be created once more."));
result.string(translate.text("This combination of person and organisation does already exist and can not be created once more."));
}
\ No newline at end of file
import("system.vars");
import("system.result");
var personId = vars.get("$field.PERSON_ID");
result.string(personId);
\ No newline at end of file
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Contact_lib");
result.string(ContactUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getContextByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
......@@ -21,6 +21,7 @@
<title>Container</title>
<mandatory v="true" />
<possibleItemsProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/possibleItemsProcess.js</possibleItemsProcess>
<newItemsAllowed v="true" />
<groupable v="true" />
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/stateProcess.js</stateProcess>
......
......@@ -7,11 +7,11 @@ if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"
{
if (vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param"))
{
result.object(db.table(vars.get("$param.ObjectRowId_param"), ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param"))));
result.object(db.table(vars.get("$param.ObjectRowId_param"), ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param"), false)));
}
else
{
result.object(db.table(ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"))))
result.object(db.table(ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"), undefined, false)))
}
}
else
......
......@@ -78,6 +78,7 @@
<title>Status</title>
<consumer>KeywordOfferStates</consumer>
<state>EDITABLE</state>
<valueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
......
......@@ -7,7 +7,7 @@ var links = [];
if (contactId)
{
links.push([ContactUtils.getContextByRelationId(contactId), contactId]);
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
......
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Contact_lib");
result.string(ContactUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getContextByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
......@@ -7,7 +7,7 @@ var links = [];
if (contactId)
{
links.push([ContactUtils.getContextByRelationId(contactId), contactId]);
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
......
......@@ -7,7 +7,7 @@ var links = [];
if (contactId)
{
links.push([ContactUtils.getContextByRelationId(contactId), contactId]);
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
......
......@@ -2,7 +2,7 @@ import("system.vars");
import("system.result");
import("Contact_lib");
var type = ContactUtils.getRelationType(vars.get("$field.CONTACT_ID"), vars.get("$field.CONTACT_PERSON_ID"), vars.get("$field.CONTACT_ORG_ID"));
var type = ContactUtils.getContactType(vars.get("$field.CONTACT_ID"), vars.get("$field.CONTACT_PERSON_ID"), vars.get("$field.CONTACT_ORG_ID"));
result.string(type != 2);
......
import("system.neon");
import("system.vars");
import("system.result");
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
result.string("25b0ac77-ef92-4809-802e-bb9d8782f865"); //Open
\ No newline at end of file
......@@ -7,7 +7,7 @@ var links = [];
if (contactId)
{
links.push([ContactUtils.getContextByRelationId(contactId), contactId]);
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
......
......@@ -7,7 +7,7 @@ var links = [];
if (contactId)
{
links.push([ContactUtils.getContextByRelationId(contactId), contactId]);
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
......
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Contact_lib");
result.string(ContactUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getContextByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
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