Hi,
i have made a modification in milestone function for a new workflow,I am getting the below error.Please help
An Error Has Occurred Expression evaluation error [evaluation ID = 67269:64b0e] in rule 'dcc_milestones' (called by rule 'dcc_request_recordsummary') at function a!milestoneField [line 599]: A milestone component [label="Milestone Status"] has an invalid value for "steps". There must be at least two steps. (APNX-1-4224-040)
a!localVariables( local!isApprovalRequest: toboolean(ri!requestDetails.isApprovalsRequest), local!isQueryRequest: toboolean(ri!requestDetails.isQueryRequest), local!isJruleRequest: toboolean(ri!requestDetails.isJRuleRequest), local!isVideoRequest: toboolean(ri!requestDetails.isVideoRequest), local!isOnCallRequest: toboolean(ri!requestDetails.isOnCallRequest), local!isConsult: if( ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_CONSULT, true(), false() ), local!isImage: if( ri!requestDetails.newRequestTypeId = cons!DCC_REQUEST_TYPE_IMAGE, true(), false() ), local!isAEMBuildingOnlyRequest: if( and( rule!DCC_isBlank(ri!requestDetails.linkedRequestId), or( ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_AEM_BUILDING, ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_CONTENT_BUILDING ) ), true(), false() ), local!isLegacyBuildingOnlyRequest: if( and( rule!DCC_isBlank(ri!requestDetails.linkedRequestId), or( ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_LEGACY_BUILDING, ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_CONTENT_BUILDING ) ), true(), false() ), local!isPublishingWorkRequired: if( local!isOnCallRequest, toboolean( index( rule!DCC_getOnCallSummaryDetails(id: ri!requestDetails.requestId).data, "wasPublishingWorkRequired", null ) ), null ), local!isConsultWithdrawn: if( tostring(ri!requestDetails.requestStatus) = cons!DCC_REQUEST_STATUS[5], true(), false() ), local!isImageWithdrawn: if( tostring(ri!requestDetails.requestStatus) = cons!DCC_REQUEST_STATUS[60], true(), false() ), local!isOnCallWithdrawn: if( tostring(ri!requestDetails.requestStatus) = cons!DCC_REQUEST_STATUS[46], true(), false() ), local!isStakeholderWithdrawn: if( tostring(ri!requestDetails.requestStatus) = cons!DCC_REQUEST_STATUS[51], true(), false() ), local!isRejected: if( tostring(ri!requestDetails.requestStatus) = cons!DCC_REQUEST_STATUS[4], true(), false() ), local!isAemRequest: if( ri!requestDetails.isAEMRequest, true(), false() ), local!isIntakeWithdrawn: if( tostring(ri!requestDetails.requestStatus) = cons!DCC_REQUEST_STATUS[28], true(), false() ), local!isAEMBuildingOnlyLinkedRequest: if( and( not( rule!DCC_isBlank(ri!requestDetails.linkedRequestId) ), or( ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_AEM_BUILDING, ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_CONTENT_BUILDING ), ), true(), false() ), local!isLegacyBuildingOnlyLinkedRequest: if( and( not( rule!DCC_isBlank(ri!requestDetails.linkedRequestId) ), or( ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_LEGACY_BUILDING, ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_CONTENT_BUILDING ) ), true(), false() ), local!videoMilestones: { a!map( id: 1, name: cons!DCC_VD_MILESTONES_STEPS[1] ), a!map( id: 3, name: cons!DCC_VD_MILESTONES_STEPS[2] ), a!map( id: 4, name: cons!DCC_VD_MILESTONES_STEPS[3] ), a!map( id: 5, name: cons!DCC_VD_MILESTONES_STEPS[4] ), a!map( id: 6, name: cons!DCC_VD_MILESTONES_STEPS[5] ), a!map( id: 17, name: cons!DCC_VD_MILESTONES_STEPS[6] ), a!map( id: 18, name: cons!DCC_VD_MILESTONES_STEPS[7] ), a!map( id: 19, name: cons!DCC_VD_MILESTONES_STEPS[8] ), a!map( id: 20, name: cons!DCC_VD_MILESTONES_STEPS[9] ), a!map( id: 9, name: cons!DCC_VD_MILESTONES_STEPS[10] ), a!map( id: 10, name: cons!DCC_VD_MILESTONES_STEPS[11] ) }, local!legacyBuildingMilestones: { a!map(id: 6, name: cons!DCC_MILESTONES_STEPS[6]), a!map(id: 1, name: cons!DCC_MILESTONES_STEPS[1]), a!map(id: 7, name: cons!DCC_MILESTONES_STEPS[7]), a!map(id: 8, name: cons!DCC_MILESTONES_STEPS[8]), a!map(id: 9, name: cons!DCC_MILESTONES_STEPS[9]), a!map( id: 10, name: cons!DCC_MILESTONES_STEPS[10] ) }, local!AEMBuildingMilestones: { if( and( a!isNullOrEmpty(ri!role.roleAssignee), not( ri!requestDetails.requestStatus = tostring(cons!DCC_REQUEST_STATUS[1]) ) ), { a!map(id: 6, name: cons!DCC_MILESTONES_STEPS[6]), a!map(id: 1, name: cons!DCC_MILESTONES_STEPS[1]), /*a!map(id: 2, name: cons!DCC_MILESTONES_STEPS[2]),*/ a!map(id: 7, name: cons!DCC_MILESTONES_STEPS[7]), a!map(id: 8, name: cons!DCC_MILESTONES_STEPS[8]), a!map(id: 9, name: cons!DCC_MILESTONES_STEPS[9]), a!map( id: 10, name: cons!DCC_MILESTONES_STEPS[10] ) }, { a!map(id: 6, name: cons!DCC_MILESTONES_STEPS[6]), a!map(id: 1, name: cons!DCC_MILESTONES_STEPS[1]), a!map(id: 2, name: cons!DCC_MILESTONES_STEPS[2]), a!map(id: 7, name: cons!DCC_MILESTONES_STEPS[7]), a!map(id: 8, name: cons!DCC_MILESTONES_STEPS[8]), a!map(id: 9, name: cons!DCC_MILESTONES_STEPS[9]), a!map( id: 10, name: cons!DCC_MILESTONES_STEPS[10] ) }, ) }, local!linkedLegacyBuildingMilestones: { a!map(id: 1, name: cons!DCC_MILESTONES_STEPS[1]), a!map(id: 7, name: cons!DCC_MILESTONES_STEPS[7]), a!map(id: 8, name: cons!DCC_MILESTONES_STEPS[8]), a!map(id: 9, name: cons!DCC_MILESTONES_STEPS[9]), a!map( id: 10, name: cons!DCC_MILESTONES_STEPS[10] ) }, local!linkedAEMBuildingMilestones: { if( and( a!isNullOrEmpty(ri!role.roleAssignee), not( ri!requestDetails.requestStatus = tostring(cons!DCC_REQUEST_STATUS[1]) ) ), { a!map(id: 1, name: cons!DCC_MILESTONES_STEPS[1]), /*a!map(id: 2, name: cons!DCC_MILESTONES_STEPS[2]),*/ a!map(id: 7, name: cons!DCC_MILESTONES_STEPS[7]), a!map(id: 8, name: cons!DCC_MILESTONES_STEPS[8]), a!map(id: 9, name: cons!DCC_MILESTONES_STEPS[9]), a!map( id: 10, name: cons!DCC_MILESTONES_STEPS[10] ) }, { a!map(id: 1, name: cons!DCC_MILESTONES_STEPS[1]), a!map(id: 2, name: cons!DCC_MILESTONES_STEPS[2]), a!map(id: 7, name: cons!DCC_MILESTONES_STEPS[7]), a!map(id: 8, name: cons!DCC_MILESTONES_STEPS[8]), a!map(id: 9, name: cons!DCC_MILESTONES_STEPS[9]), a!map( id: 10, name: cons!DCC_MILESTONES_STEPS[10] ) }, ) }, local!onCallMilestones: { a!map( id: cons!DCC_REF_ID_ON_CALL_BUSINESS_APPROVAL_MILESTONE, name: cons!DCC_OC_MILESTONE_STEPS[1] ), a!map( id: cons!DCC_REF_ID_ON_CALL_CMS_QA_MILESTONE, name: cons!DCC_OC_MILESTONE_STEPS[2] ), a!map( id: cons!DCC_REF_ID_ON_CALL_FINAL_APPROVAL_MILESTONE, name: cons!DCC_OC_MILESTONE_STEPS[3] ), a!map( id: cons!DCC_REF_ID_MILESTONE_COMPLETED, name: cons!DCC_OC_MILESTONE_STEPS[4] ) }, local!consultMilestones: { a!map( id: cons!DCC_REF_ID_MILESTONE_BACKLOG, name: cons!DCC_MILESTONES_CONSULT_REQUEST[1] ), a!map( id: cons!DCC_REF_ID_MILESTONE_CONSULTING, name: cons!DCC_MILESTONES_CONSULT_REQUEST[2] ), a!map( id: cons!DCC_REF_ID_MILESTONE_COMPLETED, name: cons!DCC_MILESTONES_CONSULT_REQUEST[3] ) }, local!ImageMilestones: { a!map( id: cons!DCC_REF_ID_MILESTONE_BACKLOG, name: cons!DCC_MILESTONES_IMAGE_REQUEST[1] ), a!map( id: cons!DCC_REF_ID_MILESTONE_BUILDING, name: cons!DCC_MILESTONES_IMAGE_REQUEST[2] ), a!map( id: cons!DCC_REF_ID_MILESTONE_QA, name: cons!DCC_MILESTONES_IMAGE_REQUEST[3] ), a!map( id: cons!DCC_REF_ID_MILESTONE_DEPLOYING, name: cons!DCC_MILESTONES_IMAGE_REQUEST[4] ), a!map( id: cons!DCC_REF_ID_MILESTONE_COMPLETED, name: cons!DCC_MILESTONES_IMAGE_REQUEST[5] ), }, local!lastMilestoneLog: if( or( local!isConsultWithdrawn, local!isIntakeWithdrawn, local!isStakeholderWithdrawn, ), rule!DCC_getLastMilestoneLogs( requestId: ri!requestDetails.requestId, milestoneRefIdToIgnoreList: { cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN } ), null ), local!lastMilestone: if( rule!DCC_isEmpty(local!lastMilestoneLog), null, if( and( ri!requestDetails.requestTypeId = cons!DCC_REQUEST_TYPE_STAKEHOLDER_REVIEW, ri!requestDetails.requestSourceId = cons!DCC_REQUEST_SOURCE_CLC_ID, tointeger( index( local!lastMilestoneLog, "milestoneRefId", {} ) ) = cons!DCC_REF_ID_MILESTONE_INTAKE_MODULE ), index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_REVIEW, ri!milestoneRefList.milestoneId ) ), index( ri!milestoneRefList, wherecontains( tointeger(local!lastMilestoneLog.milestoneRefId), ri!milestoneRefList.milestoneId ) ) ) ), local!lastImageMilestoneLog: if( or(local!isImageWithdrawn), rule!DCC_getLastMilestoneLogs(requestId: ri!requestDetails.requestId, ), null ), local!lastImageMilestone: if( rule!DCC_isEmpty(local!lastImageMilestoneLog), null, index( ri!milestoneRefList, wherecontains( tointeger( local!lastImageMilestoneLog.milestoneRefId ), ri!milestoneRefList.milestoneId ) ) ), local!lastOnCallMilestoneLog: if( or(local!isOnCallWithdrawn), rule!DCC_getLastMilestoneLogs(requestId: ri!requestDetails.requestId, ), null ), local!lastOnCallMilestone: if( rule!DCC_isEmpty(local!lastOnCallMilestoneLog), null, index( ri!milestoneRefList, wherecontains( tointeger( local!lastOnCallMilestoneLog.milestoneRefId ), ri!milestoneRefList.milestoneId ) ) ), local!filteredMileStonesList: remove( ri!milestoneRefList, wherecontains( if( local!isApprovalRequest, a!flatten( { cons!DCC_CONTENT_REQUEST_MILESTONES, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE, cons!DCC_REF_ID_MILESTONE_BACKLOG, cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE } ), if( local!isAemRequest, if( and( a!isNullOrEmpty(ri!role.roleAssignee), not( ri!requestDetails.requestStatus = tostring(cons!DCC_REQUEST_STATUS[1]) ) ), a!flatten( { rule!DCC_getMileStonesForSelectedWorkflows(requestId: ri!requestDetails.requestId), cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_CONSULTING, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_REVIEW_APPROVED, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE, cons!DCC_REF_ID_MILESTONE_BACKLOG, cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE } ), a!flatten( { rule!DCC_getMileStonesForSelectedWorkflows(requestId: ri!requestDetails.requestId), cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_REVIEW_APPROVED, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE, cons!DCC_REF_ID_MILESTONE_BACKLOG, cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE } ), ), if( and( isnull(ri!role.roleAssignee), not( ri!requestDetails.requestStatus = tostring(cons!DCC_REQUEST_STATUS[1]) ) ), a!flatten( { rule!DCC_getMileStonesForSelectedWorkflows(requestId: ri!requestDetails.requestId), cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_CONSULTING, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_REVIEW_APPROVED, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE, cons!DCC_REF_ID_MILESTONE_BACKLOG, cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE } ), if( local!isConsult = false(), a!flatten( { rule!DCC_getMileStonesForSelectedWorkflows(requestId: ri!requestDetails.requestId), cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, /*cons!DCC_REF_ID_MILESTONE_CONSULTING,*/ cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_REVIEW_APPROVED, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE, cons!DCC_REF_ID_MILESTONE_BACKLOG, cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE } ), a!flatten( { rule!DCC_getMileStonesForSelectedWorkflows(requestId: ri!requestDetails.requestId), cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_REJECTED, cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, /*cons!DCC_REF_ID_MILESTONE_CONSULTING,*/ cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_REVIEW_APPROVED, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE, cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE } ) ) ) ) ), ri!milestoneRefList.milestoneId ) ), local!stakeholderReviewMilestones: a!update( a!update( local!filteredMileStonesList, 2, ri!milestoneRefList[15] ), 3, ri!milestoneRefList[10] ), local!milestoneListForSteps: if( and( local!isRejected, not(rule!DCC_isBlank(local!lastMilestone)) ), append( index( local!filteredMileStonesList, where( local!filteredMileStonesList.milestoneSeqId <= local!lastMilestone.milestoneSeqId ) ), index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_MILESTONE_REJECTED, ri!milestoneRefList.milestoneId ) ), ), if( local!isConsultWithdrawn, append( index( local!filteredMileStonesList, where( local!filteredMileStonesList.milestoneSeqId <= local!lastMilestone.milestoneSeqId ) ), index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, ri!milestoneRefList.milestoneId ) ), ), if( local!isIntakeWithdrawn, append( index( local!filteredMileStonesList, where( tointeger( local!filteredMileStonesList.milestoneSeqId ) <= tointeger(local!lastMilestone.milestoneSeqId) ) ), index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, ri!milestoneRefList.milestoneId ) ), ), if( local!isStakeholderWithdrawn, append( index( local!stakeholderReviewMilestones, where( tointeger( local!stakeholderReviewMilestones.milestoneSeqId ) <= tointeger(local!lastMilestone.milestoneSeqId) ) ), index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, ri!milestoneRefList.milestoneId ) ) ), if( local!isApprovalRequest, local!stakeholderReviewMilestones, local!filteredMileStonesList ) ) ) ) ), { a!milestoneField( label: "Milestone Status", labelPosition: "ABOVE", steps: { if( /* Query request milestones */ local!isQueryRequest = true(), cons!DCC_MILESTONES_QUERY_MODULE, if( /* JRUle Request Milestones */ local!isJruleRequest = true(), cons!DCC_JR_MILESTONES_JRULE_MODULE, if( /* Consult Request Milestones */ local!isConsult = true(), cons!DCC_MILESTONES_CONSULT_REQUEST, if( and( local!isImage = true(), not(local!isImageWithdrawn = true()) ), cons!DCC_MILESTONES_IMAGE_REQUEST, if( and( local!isImage = true(), local!isImageWithdrawn = true() ), append( index( cons!DCC_MILESTONES_IMAGE_REQUEST, wherecontains( local!lastImageMilestone.milestoneName, cons!DCC_MILESTONES_IMAGE_REQUEST ), {} ), index( index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, ri!milestoneRefList.milestoneId ) ), "milestoneName", {} ) ), if( local!isVideoRequest = true(), /* Video REquest milestones */ index(local!videoMilestones, "name", {}), if( /* AEM Building Request milestones */ local!isAEMBuildingOnlyRequest = true(), index(local!AEMBuildingMilestones, "name", {}), if( /* Linked AEM Building Request milestones */ local!isAEMBuildingOnlyLinkedRequest = true(), index( local!linkedAEMBuildingMilestones, "name", {} ), /* Legacy Building Request milestones */ if( local!isLegacyBuildingOnlyRequest = true(), index( local!legacyBuildingMilestones, "name", {} ), if( /* Linked Legacy Building Request milestones */ local!isLegacyBuildingOnlyLinkedRequest = true(), index( local!linkedLegacyBuildingMilestones, "name", {} ), if( and( local!isOnCallRequest = true(), local!isPublishingWorkRequired = true(), not(local!isOnCallWithdrawn = true()) ), /* On Call Request Milestoens */ cons!DCC_OC_MILESTONE_STEPS, if( and( local!isOnCallRequest = true(), local!isOnCallWithdrawn = true() ), append( index( cons!DCC_OC_MILESTONE_STEPS, wherecontains( local!lastOnCallMilestone.milestoneName, cons!DCC_OC_MILESTONE_STEPS, ), {} ), index( index( ri!milestoneRefList, wherecontains( cons!DCC_REF_ID_ON_CALL_WITHDRAWN_MILESTONE, ri!milestoneRefList.milestoneId ) ), "milestoneName", {} ) ), /* AEM, Tridion, Stakeholder, Editing only request Mielstones */ a!forEach( items: local!milestoneListForSteps, expression: { fv!item.milestoneName } ) ) ) ) ) ) ) ) ) ) ) ) ) }, active: if( local!isQueryRequest = true(), if( ri!requestDetails.milestoneId = cons!DCC_REF_ID_MILESTONE_QUERY_MODULE, 1, if( ri!requestDetails.milestoneId = cons!DCC_REF_ID_MILESTONE_QUERY_WITHDRAWN, null(), - 1 ) ), if( local!isJruleRequest = true(), if( ri!requestDetails.milestoneId = cons!DCC_JR_REF_ID_MILESTONE_JRULE_MODULE, 1, if( ri!requestDetails.milestoneId = cons!DCC_REF_ID_MILESTONE_JRULE_WITHDRAWN, null(), - 1 ) ), if( local!isConsult = true(), if( contains( { cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_CONSULT_NOT_VIABLE }, ri!requestDetails.milestoneId ), null(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger(local!consultMilestones.id) ) ) ), if( local!isImage = true(), if( ri!requestDetails.milestoneId = cons!DCC_REF_ID_MILESTONE_IMAGE_WITHDRAWN, null(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger(local!ImageMilestones.id) ) ) ), if( local!isVideoRequest = true(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, if( local!isRejected = true(), 5, wherecontains( ri!requestDetails.milestoneId, tointeger(local!videoMilestones.id) ) ) ), /*if(*/ /*and(*/ /*local!isOnCallRequest = true(),*/ /*local!isPublishingWorkRequired = true()*/ /*),*/ /*if(*/ /*contains(*/ /*cons!DCC_REF_ID_MILESTONE_COMPLETED,*/ /*ri!requestDetails.milestoneId*/ /*),*/ /*- 1,*/ /*wherecontains(*/ /*ri!requestDetails.milestoneId,*/ /*tointeger(local!onCallMilestones.id)*/ /*)*/ /*),*/ if( local!isAEMBuildingOnlyRequest = true(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger(local!AEMBuildingMilestones.id) ) ), if( local!isAEMBuildingOnlyLinkedRequest = true(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger(local!linkedAEMBuildingMilestones.id) ) ), if( local!isLegacyBuildingOnlyRequest = true(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger(local!legacyBuildingMilestones.id) ) ), if( local!isLegacyBuildingOnlyLinkedRequest = true(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger( local!linkedLegacyBuildingMilestones.id ) ) ), if( and( local!isOnCallRequest = true(), local!isPublishingWorkRequired = true() ), if( ri!requestDetails.milestoneId = cons!DCC_REF_ID_MILESTONE_ON_CALL_WITHDRAWN, null(), if( contains( cons!DCC_REF_ID_MILESTONE_COMPLETED, ri!requestDetails.milestoneId ), - 1, wherecontains( ri!requestDetails.milestoneId, tointeger(local!onCallMilestones.id) ) ) ), if( contains( { cons!DCC_REF_ID_MILESTONE_COMPLETED, cons!DCC_REF_ID_MILESTONE_CONSULT_WITHDRAWN, /*cons!DCC_REF_ID_MILESTONE_REJECTED,*/ cons!DCC_REF_ID_MILESTONE_INTAKE_WITHDRAWN, cons!DCC_REF_ID_MILESTONE_STAKEHOLDER_WITHDRAWN, }, ri!requestDetails.milestoneId ), - 1, if( local!isRejected, wherecontains( cons!DCC_MILESTONES_STEPS[6], local!milestoneListForSteps.milestoneName ), wherecontains( ri!requestDetails.milestoneId, tointeger( local!milestoneListForSteps.milestoneId ) ) ) ) ) ) ) ) ) /*)*/ ) ) ) ) ), showWhen: if( and( local!isOnCallRequest, toboolean(local!isPublishingWorkRequired) = false() ), false(), true() ) ) } )
Screenshot:
Discussion posts and replies are publicly visible
Check line 599 where you define the milestone field via if clause... Each combination must contain at least 2 steps and in some cases it seems to return only 1