Skip to content
Snippets Groups Projects
Commit d4442296 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

add support ticket to 360 degree

parent 8ad39806
No related branches found
No related tags found
No related merge requests found
import("system.vars");
import("system.result");
result.object(["Offer", "Contract", "Campaign", "Order"]);
\ No newline at end of file
result.object(["Offer", "Contract", "Campaign", "Order", "SupportTicket"]);
\ No newline at end of file
......@@ -8,6 +8,7 @@ import("Keyword_lib");
import("Sql_lib");
import("Proto_lib");
import("Contact_lib");
import("KeywordRegistry_basic");
/**
* Methods to manage contexts.
......@@ -370,7 +371,7 @@ ContextUtils.getSelectMap = function()
.setJoinExpression("join CONTACT on ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID and CONTACT.PERSON_ID is null")
.setCondition(SqlCondition.begin().and("ORGANISATION.ORGANISATIONID != '0'"))
.setSubContexts({
"Person": ["select CONTACTID from CONTACT where PERSON_ID is not null and", "CONTACT.ORGANISATION_ID", '', ["Offer", "Order", "Contract"]]
"Person": ["select CONTACTID from CONTACT where PERSON_ID is not null and", "CONTACT.ORGANISATION_ID", '', ["Offer", "Order", "Contract", "SupportTicket"]]
})
,"Person": ContextSelector.create("CONTACT", "CONTACTID")
.setTitleExpression(maskingUtils.concat([
......@@ -445,7 +446,13 @@ ContextUtils.getSelectMap = function()
.setStateField("CAMPAIGN.STATE")
.setActiveStates(["e04c9c59-0590-463c-a10e-e25c583e9cf2", "42e1ee2b-0108-4ccf-ab43-29cbcb0377bf"])
,"CampaignStep" : ContextSelector.create("CAMPAIGNSTEP", "CAMPAIGNSTEPID", "NAME")
,"SupportTicket": ContextSelector.create("TICKET", "TICKETID", "TASK.SUBJECT")
.setJoinExpression("left join TASK on TASK.TASKID = TICKET.TASK_ID")
.setCondition(SqlCondition.begin().andPrepare("TICKET.TICKETTYPE", $KeywordRegistry.ticketType$supportTicket()))
.setContactIdField("TASK.REQUESTOR_CONTACT_ID")
.setStateField("TASK.STATUS")
.setActiveStates([$KeywordRegistry.taskStatus$new(), $KeywordRegistry.taskStatus$inProcess()])
.setCreationDateField("TASK.START_DATE")
}
}
......@@ -511,6 +518,7 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc
var cond = SqlCondition.begin();
if (pContactId)
{
logging.log(JSON.stringify(ownContextSelector, null, "\t"))
cond.andPrepare(ownContextSelector.getFullField(ownContextSelector.contactIdField), pContactId)
}
......
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