From 3fad62e9cb9a628906d366ff2425ba6a85057cc1 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Tue, 29 Oct 2019 13:00:58 +0100 Subject: [PATCH] remove autopad / usages of StringUtils.pad36 --- process/DataPrivacy_lib/process.js | 2 +- process/KeywordRegistry_basic/process.js | 179 +++++++++++------------ process/Ticket_lib/process.js | 6 +- 3 files changed, 91 insertions(+), 96 deletions(-) diff --git a/process/DataPrivacy_lib/process.js b/process/DataPrivacy_lib/process.js index 4124997ee1..573d623a41 100644 --- a/process/DataPrivacy_lib/process.js +++ b/process/DataPrivacy_lib/process.js @@ -397,7 +397,7 @@ DataPrivacyUtils.collectAll = function(pContactId, pFilterCond) "", // "DATE_EDIT," + // 9 currentUser, // "USER_NEW," + // 10 "", // "USER_EDIT " // 11 - KeywordUtils.getViewValue($KeywordRegistry.dsgvoType(), StringUtils.pad36(dsgvotype.key)), // 12 + KeywordUtils.getViewValue($KeywordRegistry.dsgvoType(), dsgvotype.key), // 12 ]) } }); diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index ef14e2bc2a..6c38062fe8 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -16,121 +16,118 @@ * $KeywordRegistry.activityDirection() */ function $KeywordRegistry(){} -// this function can also be found as StringUtils.pad36() in Util_lib and is just here to avoid an import because this registry is heavily used. -$KeywordRegistry._autoPad = function(pKey){return (pKey + " ").slice(0, 36)}; - $KeywordRegistry.attributeType = function(){return "AttributeType";}; $KeywordRegistry.keywordAttributeType = function(){return "KeywordAttributeType";}; $KeywordRegistry.contractPayment = function(){return "ContractPayment";}; $KeywordRegistry.contractStatus = function(){return "ContractStatus";}; -$KeywordRegistry.contractState$validLimited = function(){return $KeywordRegistry._autoPad("CONTRACTSTATVALIDLI");}; -$KeywordRegistry.contractState$validUnlimited = function(){return $KeywordRegistry._autoPad("CONTRACTSTATVALIDUNLI");}; -$KeywordRegistry.contractState$notSigned = function(){return $KeywordRegistry._autoPad("CONTRACTSTATSIGN");}; +$KeywordRegistry.contractState$validLimited = function(){return "CONTRACTSTATVALIDLI";}; +$KeywordRegistry.contractState$validUnlimited = function(){return "CONTRACTSTATVALIDUNLI";}; +$KeywordRegistry.contractState$notSigned = function(){return "CONTRACTSTATSIGN";}; $KeywordRegistry.contractType = function(){return "ContractType";}; $KeywordRegistry.activityDirection = function(){return "ActivityDirection";}; -$KeywordRegistry.activityDirection$incoming = function(){return $KeywordRegistry._autoPad("i");}; -$KeywordRegistry.activityDirection$outgoing = function(){return $KeywordRegistry._autoPad("o");}; -$KeywordRegistry.activityDirection$internal = function(){return $KeywordRegistry._autoPad("x");}; +$KeywordRegistry.activityDirection$incoming = function(){return "i";}; +$KeywordRegistry.activityDirection$outgoing = function(){return "o";}; +$KeywordRegistry.activityDirection$internal = function(){return "x";}; $KeywordRegistry.contactStatus = function(){return "ContactStatus";}; -$KeywordRegistry.contactStatus$active = function(){return $KeywordRegistry._autoPad("CONTACTSTATACTIVE");}; +$KeywordRegistry.contactStatus$active = function(){return "CONTACTSTATACTIVE";}; $KeywordRegistry.currency = function(){return "Currency";}; -$KeywordRegistry.currency$eur = function(){return $KeywordRegistry._autoPad("EUR");}; +$KeywordRegistry.currency$eur = function(){return "EUR";}; $KeywordRegistry.productGroupcode = function(){return "ProductGroupcode";}; $KeywordRegistry.offerStatus = function(){return "OfferStatus";}; -$KeywordRegistry.offerStatus$open = function(){return $KeywordRegistry._autoPad("OFFERSTATOPEN");}; -$KeywordRegistry.offerStatus$checked = function(){return $KeywordRegistry._autoPad("OFFERSTATCHECK");}; -$KeywordRegistry.offerStatus$sent = function(){return $KeywordRegistry._autoPad("OFFERSTATSENT");}; -$KeywordRegistry.offerStatus$won = function(){return $KeywordRegistry._autoPad("OFFERSTATWON");}; -$KeywordRegistry.offerStatus$lost = function(){return $KeywordRegistry._autoPad("OFFERSTATLOST");}; +$KeywordRegistry.offerStatus$open = function(){return "OFFERSTATOPEN";}; +$KeywordRegistry.offerStatus$checked = function(){return "OFFERSTATCHECK";}; +$KeywordRegistry.offerStatus$sent = function(){return "OFFERSTATSENT";}; +$KeywordRegistry.offerStatus$won = function(){return "OFFERSTATWON";}; +$KeywordRegistry.offerStatus$lost = function(){return "OFFERSTATLOST";}; $KeywordRegistry.organisationType = function(){return "OrganisationType";}; -$KeywordRegistry.organisationType$manufacturer = function(){return $KeywordRegistry._autoPad("ORGMANUF");}; -$KeywordRegistry.organisationType$competitor = function(){return $KeywordRegistry._autoPad("ORGCOMP");}; +$KeywordRegistry.organisationType$manufacturer = function(){return "ORGMANUF";}; +$KeywordRegistry.organisationType$competitor = function(){return "ORGCOMP";}; $KeywordRegistry.personGender = function(){return "PersonGender";}; $KeywordRegistry.taskStatus = function(){return "TaskStatus";}; -$KeywordRegistry.taskStatus$new = function(){return $KeywordRegistry._autoPad("NEW");}; -$KeywordRegistry.taskStatus$unassigned = function(){return $KeywordRegistry._autoPad("UNASSIGNED");}; -$KeywordRegistry.taskStatus$assigned = function(){return $KeywordRegistry._autoPad("ASSIGNED");}; -$KeywordRegistry.taskStatus$inProgress = function(){return $KeywordRegistry._autoPad("IN-PROGRESS");}; -$KeywordRegistry.taskStatus$waiting = function(){return $KeywordRegistry._autoPad("WAITING");}; -$KeywordRegistry.taskStatus$ended = function(){return $KeywordRegistry._autoPad("ENDED");}; -$KeywordRegistry.taskStatus$endedDone = function(){return $KeywordRegistry._autoPad("ENDED-DONE");}; -$KeywordRegistry.taskStatus$endedAbandoned = function(){return $KeywordRegistry._autoPad("ENDED-ABANDONED");}; -$KeywordRegistry.taskStatus$customerChecks = function(){return $KeywordRegistry._autoPad("CUSTOMER-CHECKS");}; +$KeywordRegistry.taskStatus$new = function(){return "NEW";}; +$KeywordRegistry.taskStatus$unassigned = function(){return "UNASSIGNED";}; +$KeywordRegistry.taskStatus$assigned = function(){return "ASSIGNED";}; +$KeywordRegistry.taskStatus$inProgress = function(){return "IN-PROGRESS";}; +$KeywordRegistry.taskStatus$waiting = function(){return "WAITING";}; +$KeywordRegistry.taskStatus$ended = function(){return "ENDED";}; +$KeywordRegistry.taskStatus$endedDone = function(){return "ENDED-DONE";}; +$KeywordRegistry.taskStatus$endedAbandoned = function(){return "ENDED-ABANDONED";}; +$KeywordRegistry.taskStatus$customerChecks = function(){return "CUSTOMER-CHECKS";}; $KeywordRegistry.taskType = function(){return "TaskType";}; -$KeywordRegistry.taskType$task = function(){return $KeywordRegistry._autoPad("TASK");}; -$KeywordRegistry.taskType$ticket = function(){return $KeywordRegistry._autoPad("TICKET");}; +$KeywordRegistry.taskType$task = function(){return "TASK";}; +$KeywordRegistry.taskType$ticket = function(){return "TICKET";}; $KeywordRegistry.ticketType = function(){return "TicketType";}; -$KeywordRegistry.ticketType$supportTicket = function(){return $KeywordRegistry._autoPad("SUPPORTTICKET");}; +$KeywordRegistry.ticketType$supportTicket = function(){return "SUPPORTTICKET";}; $KeywordRegistry.productPricelist = function(){return "ProductPricelist";}; -$KeywordRegistry.productPricelist$standardList = function(){return $KeywordRegistry._autoPad("PRICELISTDEFAULT");}; +$KeywordRegistry.productPricelist$standardList = function(){return "PRICELISTDEFAULT";}; $KeywordRegistry.quantityUnit = function(){return "QuantityUnit";}; -$KeywordRegistry.quantityUnit$pieces = function(){return $KeywordRegistry._autoPad("QUANTITYPIECES");}; +$KeywordRegistry.quantityUnit$pieces = function(){return "QUANTITYPIECES";}; $KeywordRegistry.MemberRole = function(){return "MemberRole";}; $KeywordRegistry.salesprojectSource = function(){return "SalesprojectSource";}; $KeywordRegistry.salesorderState = function(){return "SalesorderState";}; -$KeywordRegistry.salesorderState$checked = function(){return $KeywordRegistry._autoPad("SALORDERSTATCHECK");}; -$KeywordRegistry.salesorderState$sent = function(){return $KeywordRegistry._autoPad("SALORDERSTATSENT");}; -$KeywordRegistry.salesorderState$won = function(){return $KeywordRegistry._autoPad("SALORDERSTATWON");}; -$KeywordRegistry.salesorderState$lost = function(){return $KeywordRegistry._autoPad("SALORDERSTATLOST");}; +$KeywordRegistry.salesorderState$checked = function(){return "SALORDERSTATCHECK";}; +$KeywordRegistry.salesorderState$sent = function(){return "SALORDERSTATSENT";}; +$KeywordRegistry.salesorderState$won = function(){return "SALORDERSTATWON";}; +$KeywordRegistry.salesorderState$lost = function(){return "SALORDERSTATLOST";}; $KeywordRegistry.salesprojectWonLost = function(){return "SalesprojectWonLost";}; $KeywordRegistry.stockWarehouse = function(){return "StockWarehouse";}; $KeywordRegistry.salesprojectProbability = function(){return "SalesprojectProbability";}; $KeywordRegistry.activityCategory = function(){return "ActivityCategory";}; -$KeywordRegistry.activityCategory$mail = function(){return $KeywordRegistry._autoPad("MAIL");}; +$KeywordRegistry.activityCategory$mail = function(){return "MAIL";}; $KeywordRegistry.addressType = function(){return "AddressType";}; -$KeywordRegistry.addressType$private = function(){return $KeywordRegistry._autoPad("HOMEADDR");}; -$KeywordRegistry.addressType$office = function(){return $KeywordRegistry._autoPad("OFFICEADDR");}; +$KeywordRegistry.addressType$private = function(){return "HOMEADDR";}; +$KeywordRegistry.addressType$office = function(){return "OFFICEADDR";}; $KeywordRegistry.offerProbability = function(){return "OfferProbability";}; $KeywordRegistry.communicationMedium = function(){return "CommunicationMedium";}; -$KeywordRegistry.communicationMedium$mail = function(){return $KeywordRegistry._autoPad("COMMEMAIL");}; +$KeywordRegistry.communicationMedium$mail = function(){return "COMMEMAIL";}; $KeywordRegistry.salesprojectPricePolitics = function(){return "SalesprojectPricePolitics";}; $KeywordRegistry.salesprojectWeakness = function(){return "SalesprojectWeakness";}; $KeywordRegistry.salesprojectStrenght = function(){return "SalesprojectStrenght";}; $KeywordRegistry.salesprojectState = function(){return "SalesprojectState";}; -$KeywordRegistry.salesprojectState$open = function(){return $KeywordRegistry._autoPad("SALPROJSTATOPEN");}; -$KeywordRegistry.salesprojectState$postponed = function(){return $KeywordRegistry._autoPad("SALPROJSTATPOSTPONED");}; -$KeywordRegistry.salesprojectState$aborted = function(){return $KeywordRegistry._autoPad("SALPROJSTATABORT");}; -$KeywordRegistry.salesprojectState$partialOrder = function(){return $KeywordRegistry._autoPad("SALPROJSTATPARTIAL");}; -$KeywordRegistry.salesprojectState$order = function(){return $KeywordRegistry._autoPad("SALPROJSTATORDER");}; -$KeywordRegistry.salesprojectState$lost = function(){return $KeywordRegistry._autoPad("SALPROJSTATLOST");}; +$KeywordRegistry.salesprojectState$open = function(){return "SALPROJSTATOPEN";}; +$KeywordRegistry.salesprojectState$postponed = function(){return "SALPROJSTATPOSTPONED";}; +$KeywordRegistry.salesprojectState$aborted = function(){return "SALPROJSTATABORT";}; +$KeywordRegistry.salesprojectState$partialOrder = function(){return "SALPROJSTATPARTIAL";}; +$KeywordRegistry.salesprojectState$order = function(){return "SALPROJSTATORDER";}; +$KeywordRegistry.salesprojectState$lost = function(){return "SALPROJSTATLOST";}; $KeywordRegistry.salesprojectPhase = function(){return "SalesprojectPhase";}; -$KeywordRegistry.salesprojectPhase$nqc = function(){return $KeywordRegistry._autoPad("SALPROJPHASENQC");}; +$KeywordRegistry.salesprojectPhase$nqc = function(){return "SALPROJPHASENQC";}; $KeywordRegistry.taskPriority = function(){return "TaskPriority";}; -$KeywordRegistry.taskPriority$none = function(){return $KeywordRegistry._autoPad("TASKPRIONONE");}; -$KeywordRegistry.taskPriority$low = function(){return $KeywordRegistry._autoPad("TASKPRIOLOW");}; -$KeywordRegistry.taskPriority$medium = function(){return $KeywordRegistry._autoPad("TASKPRIOMEDIUM");}; -$KeywordRegistry.taskPriority$high = function(){return $KeywordRegistry._autoPad("TASKPRIOHIGH");}; +$KeywordRegistry.taskPriority$none = function(){return "TASKPRIONONE";}; +$KeywordRegistry.taskPriority$low = function(){return "TASKPRIOLOW";}; +$KeywordRegistry.taskPriority$medium = function(){return "TASKPRIOMEDIUM";}; +$KeywordRegistry.taskPriority$high = function(){return "TASKPRIOHIGH";}; $KeywordRegistry.taskProgress = function(){return "TaskProgress";}; -$KeywordRegistry.taskProgress$0 = function(){return $KeywordRegistry._autoPad("TASKPROG0");}; +$KeywordRegistry.taskProgress$0 = function(){return "TASKPROG0";}; $KeywordRegistry.competitionState = function(){return "CompetitionState";}; -$KeywordRegistry.competitionState$lost = function(){return $KeywordRegistry._autoPad("COMPSTATELOST");}; +$KeywordRegistry.competitionState$lost = function(){return "COMPSTATELOST";}; $KeywordRegistry.objectRelationType = function(){return "ObjectRelationType";}; $KeywordRegistry.deliveryTerm = function(){return "DeliveryTerm";}; $KeywordRegistry.paymentTerm = function(){return "PaymentTerm";}; @@ -139,30 +136,30 @@ $KeywordRegistry.contactPosition = function(){return "ContactPosition";}; $KeywordRegistry.contactContactrole = function(){return "ContactContactrole";}; $KeywordRegistry.campaignState = function(){return "CampaignManagementStates";}; -$KeywordRegistry.campaignState$planning = function(){return $KeywordRegistry._autoPad("PLANNING");}; -$KeywordRegistry.campaignState$approved = function(){return $KeywordRegistry._autoPad("APPROVED");}; +$KeywordRegistry.campaignState$planning = function(){return "PLANNING";}; +$KeywordRegistry.campaignState$approved = function(){return "APPROVED";}; $KeywordRegistry.campaignStepState = function(){return "CampaignManagementStepStates";}; -$KeywordRegistry.campaignStepState$open = function(){return $KeywordRegistry._autoPad("OPEN");}; +$KeywordRegistry.campaignStepState$open = function(){return "OPEN";}; $KeywordRegistry.campaignStepCostCategory = function(){return "CampaignManagementCostCategory";}; $KeywordRegistry.documentTemplateType = function(){return "DocumentTemplateType";}; -$KeywordRegistry.documentTemplateType$letter = function(){return $KeywordRegistry._autoPad("LET");}; -$KeywordRegistry.documentTemplateType$textModular = function(){return $KeywordRegistry._autoPad("TEX");}; -$KeywordRegistry.documentTemplateType$mail = function(){return $KeywordRegistry._autoPad("MAI");}; -$KeywordRegistry.documentTemplateType$attachment = function(){return $KeywordRegistry._autoPad("ATT");}; +$KeywordRegistry.documentTemplateType$letter = function(){return "LET";}; +$KeywordRegistry.documentTemplateType$textModular = function(){return "TEX";}; +$KeywordRegistry.documentTemplateType$mail = function(){return "MAI";}; +$KeywordRegistry.documentTemplateType$attachment = function(){return "ATT";}; $KeywordRegistry.documentTemplateTypeCategory = function(){return "DocumentTemplateTypeCategory";}; -$KeywordRegistry.documentTemplateTypeCategory$single = function(){return $KeywordRegistry._autoPad("1");}; -$KeywordRegistry.documentTemplateTypeCategory$serial = function(){return $KeywordRegistry._autoPad("2");}; -$KeywordRegistry.documentTemplateTypeCategory$htmlTemplate = function(){return $KeywordRegistry._autoPad("7");}; +$KeywordRegistry.documentTemplateTypeCategory$single = function(){return "1";}; +$KeywordRegistry.documentTemplateTypeCategory$serial = function(){return "2";}; +$KeywordRegistry.documentTemplateTypeCategory$htmlTemplate = function(){return "7";}; $KeywordRegistry.classificationType = function(){return "ClassificationType";}; -$KeywordRegistry.classificationType$salesproject = function(){return $KeywordRegistry._autoPad("SALESPROJ");}; +$KeywordRegistry.classificationType$salesproject = function(){return "SALESPROJ";}; $KeywordRegistry.personGender = function(){return "PersonGender";}; -$KeywordRegistry.personGender$other = function(){return $KeywordRegistry._autoPad("o");}; +$KeywordRegistry.personGender$other = function(){return "o";}; $KeywordRegistry.permissionCondType = function(){return "PermissionCondType";}; $KeywordRegistry.permissionAccessType = function(){return "PermissionAccessType";}; @@ -170,53 +167,53 @@ $KeywordRegistry.dsgvoPurpose = function(){return "DSGVOPurpose";}; $KeywordRegistry.dsgvoStatuoritysource = function(){return "DSGVOStatuoritysource";}; $KeywordRegistry.dsgvoType = function() {return "DSGVOType";}; -$KeywordRegistry.dsgvoType$birth = function(){return $KeywordRegistry._autoPad("TYPE_BIRTH");}; +$KeywordRegistry.dsgvoType$birth = function(){return "TYPE_BIRTH";}; $KeywordRegistry.dsgvoTransmission = function() {return "DSGVOTransmission";}; -$KeywordRegistry.dsgvoTransmission$none = function(){return $KeywordRegistry._autoPad("DSGVONONE");}; -$KeywordRegistry.dsgvoTransmission$inland = function(){return $KeywordRegistry._autoPad("DSGVOINLAND");}; -$KeywordRegistry.dsgvoTransmission$foreign = function(){return $KeywordRegistry._autoPad("DSGVOFOREIGN");}; +$KeywordRegistry.dsgvoTransmission$none = function(){return "DSGVONONE";}; +$KeywordRegistry.dsgvoTransmission$inland = function(){return "DSGVOINLAND";}; +$KeywordRegistry.dsgvoTransmission$foreign = function(){return "DSGVOFOREIGN";}; $KeywordRegistry.dsgvoDeadline = function() {return "DSGVODeadline";}; -$KeywordRegistry.dsgvoDeadline$onTime = function(){return $KeywordRegistry._autoPad("DSGVOONTIME");}; -$KeywordRegistry.dsgvoDeadline$complex = function(){return $KeywordRegistry._autoPad("DSGVODEADLINECOMPLEX");}; -$KeywordRegistry.dsgvoDeadline$count = function(){return $KeywordRegistry._autoPad("DSGVODEADLINECOUNT");}; +$KeywordRegistry.dsgvoDeadline$onTime = function(){return "DSGVOONTIME";}; +$KeywordRegistry.dsgvoDeadline$complex = function(){return "DSGVODEADLINECOMPLEX";}; +$KeywordRegistry.dsgvoDeadline$count = function(){return "DSGVODEADLINECOUNT";}; $KeywordRegistry.dsgvoGuarantee = function() {return "DSGVOGuarantee";}; $KeywordRegistry.textPlaceholder = function(){return "textPlaceholder";}; $KeywordRegistry.communicationMediumCampaign = function(){return "CommunicationMediumCampaign";}; -$KeywordRegistry.communicationMediumCampaign$mail = function(){return $KeywordRegistry._autoPad("CAMPAIGNEMAIL");}; -$KeywordRegistry.communicationMediumCampaign$letter = function(){return $KeywordRegistry._autoPad("CAMPAIGNLETTER");}; +$KeywordRegistry.communicationMediumCampaign$mail = function(){return "CAMPAIGNEMAIL";}; +$KeywordRegistry.communicationMediumCampaign$letter = function(){return "CAMPAIGNLETTER";}; $KeywordRegistry.bulkMailRecipientStatus = function(){return "BulkMailRecipientStatus";}; -$KeywordRegistry.bulkMailRecipientStatus$pending = function(){return $KeywordRegistry._autoPad("EMAILPENDING");}; -$KeywordRegistry.bulkMailRecipientStatus$sent = function(){return $KeywordRegistry._autoPad("EMAILSENT");}; -$KeywordRegistry.bulkMailRecipientStatus$failed = function(){return $KeywordRegistry._autoPad("EMAILFAILED");}; +$KeywordRegistry.bulkMailRecipientStatus$pending = function(){return "EMAILPENDING";}; +$KeywordRegistry.bulkMailRecipientStatus$sent = function(){return "EMAILSENT";}; +$KeywordRegistry.bulkMailRecipientStatus$failed = function(){return "EMAILFAILED";}; $KeywordRegistry.bulkMailStatus = function(){return "BulkMailStatus";}; -$KeywordRegistry.bulkMailStatus$notSent = function(){return $KeywordRegistry._autoPad("BULKMAILNOTSENT");}; -$KeywordRegistry.bulkMailStatus$beingSent = function(){return $KeywordRegistry._autoPad("BULKMAILBEINGSENT");}; -$KeywordRegistry.bulkMailStatus$sent = function(){return $KeywordRegistry._autoPad("BULKMAILSENT");}; +$KeywordRegistry.bulkMailStatus$notSent = function(){return "BULKMAILNOTSENT";}; +$KeywordRegistry.bulkMailStatus$beingSent = function(){return "BULKMAILBEINGSENT";}; +$KeywordRegistry.bulkMailStatus$sent = function(){return "BULKMAILSENT";}; $KeywordRegistry.serialLetterStatus = function(){return "SerialLetterStatus";}; -$KeywordRegistry.serialLetterStatus$notSent = function(){return $KeywordRegistry._autoPad("SERIALLETTERNOTSENT");}; -$KeywordRegistry.serialLetterStatus$sent = function(){return $KeywordRegistry._autoPad("SERIALLETTERSENT");}; +$KeywordRegistry.serialLetterStatus$notSent = function(){return "SERIALLETTERNOTSENT";}; +$KeywordRegistry.serialLetterStatus$sent = function(){return "SERIALLETTERSENT";}; $KeywordRegistry.callDirection = function(){return "CallDirection";}; -$KeywordRegistry.callDirection$incoming = function(){return $KeywordRegistry._autoPad("INC");}; -$KeywordRegistry.callDirection$outgoing = function(){return $KeywordRegistry._autoPad("OUT");}; +$KeywordRegistry.callDirection$incoming = function(){return "INC";}; +$KeywordRegistry.callDirection$outgoing = function(){return "OUT";}; $KeywordRegistry.callAnswerMode = function(){return "CallAnswerMode";}; -$KeywordRegistry.callAnswerMode$accepted = function(){return $KeywordRegistry._autoPad("ACCEPTED");}; -$KeywordRegistry.callAnswerMode$missed = function(){return $KeywordRegistry._autoPad("MISSED");}; +$KeywordRegistry.callAnswerMode$accepted = function(){return "ACCEPTED";}; +$KeywordRegistry.callAnswerMode$missed = function(){return "MISSED";}; $KeywordRegistry.orderType = function(){return "OrderType";}; -$KeywordRegistry.orderType$confirmation = function(){return $KeywordRegistry._autoPad("ORDTYPECONF");}; -$KeywordRegistry.orderType$deliverynote = function(){return $KeywordRegistry._autoPad("ORDTYPENOTE");}; -$KeywordRegistry.orderType$invoice = function(){return $KeywordRegistry._autoPad("ORDTYPEINVO");}; -$KeywordRegistry.orderType$credit = function(){return $KeywordRegistry._autoPad("ORDTYPECRED");}; -$KeywordRegistry.orderType$cancellation = function(){return $KeywordRegistry._autoPad("ORDTYPECANC");}; +$KeywordRegistry.orderType$confirmation = function(){return "ORDTYPECONF";}; +$KeywordRegistry.orderType$deliverynote = function(){return "ORDTYPENOTE";}; +$KeywordRegistry.orderType$invoice = function(){return "ORDTYPEINVO";}; +$KeywordRegistry.orderType$credit = function(){return "ORDTYPECRED";}; +$KeywordRegistry.orderType$cancellation = function(){return "ORDTYPECANC";}; $KeywordRegistry.dunningLevel = function(){return "DunningLevel";}; $KeywordRegistry.bulkMailProblem = function(){return "BulkMailProblem";}; \ No newline at end of file diff --git a/process/Ticket_lib/process.js b/process/Ticket_lib/process.js index 38b8f4d081..dca0cd1770 100644 --- a/process/Ticket_lib/process.js +++ b/process/Ticket_lib/process.js @@ -122,10 +122,8 @@ TicketUtils.prototype.getTypeAttributes = function() TicketUtils.prototype.getAvailableStatus = function() { states = JSON.parse(KeywordUtils.getAttributeRelation(this.type, $KeywordRegistry.ticketType(), "availableStatus", "")) - if (states == null) - return states; - return states.map(StringUtils.pad36); + return states; } /** @@ -135,7 +133,7 @@ TicketUtils.prototype.getAvailableStatus = function() */ TicketUtils.prototype.getDefaultStatus = function() { - return StringUtils.pad36(KeywordUtils.getAttributeRelation(this.type, $KeywordRegistry.ticketType(), "defaultStatus", "")); + return KeywordUtils.getAttributeRelation(this.type, $KeywordRegistry.ticketType(), "defaultStatus", ""); } /** -- GitLab