sfdx-isv / territory-management-toolkit

The Territory Management Toolkit (TM-Tools) is a Salesforce CLI Plugin that provides tools for simplifying the migration of a Salesforce org from Territory Management (TM1) to Enterprise Territory Management (TM2).
BSD 3-Clause "New" or "Revised" License
9 stars 0 forks source link

tm2:deploy: Generator 'tmtools-tm2-deploy' failed. Metadata Deployment Failed. The metadata deploy operation failed. #16

Open purvajainnn opened 5 years ago

purvajainnn commented 5 years ago

@VivekMChawla

Below is the Error on one of the orgs 'A boolean filter may not be specified without specifying at least two rule items.'

   "success": false
  },
  "stack": "mdapiDeployFailed: The metadata deploy operation failed.\n    at ALMError (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/salesforce-alm/dist/lib/core/almError.js:44:19)\n    at MdDeployReportApi._throwErrorIfDeployFailed (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/salesforce-alm/dist/lib/mdapi/mdapiDeployReportApi.js:314:25)\n    at BBPromise.resolve.then.then.result (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/salesforce-alm/dist/lib/mdapi/mdapiDeployReportApi.js:275:34)\n    at tryCatcher (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/promise.js:517:31)\n    at Promise._settlePromise (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/promise.js:574:18)\n    at Promise._settlePromise0 (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/promise.js:619:10)\n    at Promise._settlePromises (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/promise.js:699:18)\n    at _drainQueueStep (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/async.js:138:12)\n    at _drainQueue (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/async.js:131:9)\n    at Async._drainQueues (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/async.js:147:5)\n    at Immediate.Async.drainQueues [as _onImmediate] (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/bluebird/js/release/async.js:17:14)\n    at runCallback (timers.js:705:18)\n    at tryOnImmediate (timers.js:676:5)\n    at processImmediate (timers.js:658:5)\nOuter stack:\n    at Function.wrap (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/@salesforce/core/lib/sfdxError.js:151:27)\n    at MdapiDeployCommand.catch (/Users/purvajain/.local/share/sfdx/client/7.26.0-9118501918/node_modules/salesforce-alm/dist/ToolbeltCommand.js:247:46)",
  "warnings": []
}

CLI Error Actions:
CLI Error Raw Result: (Depth 10)
{ checkOnly: false,
LI Error Raw Result: (Depth 10)
{ checkOnly: false,
  completedDate: '2019-10-16T01:50:19.000Z',
  createdBy: '005i00000023j2w',
  createdByName: 'Admin User',
  createdDate: '2019-10-16T01:50:11.000Z',
  details:
   { componentFailures:
      [ { changed: 'false',
          componentType: 'Territory2Rule',
          created: 'false',
          createdDate: '2019-10-16T01:50:16.000Z',
          deleted: 'false',
          fileName:
           'tm2-main-deployment/territory2Models/Imported_Territory/rules/VT_RULE101.territory2Rule',
          fullName: 'Imported_Territory.VT_RULE101',
          problem:
           'A boolean filter may not be specified without specifying at least two rule items.',
          problemType: 'Error',
          success: 'false' },
        { changed: 'false',
          componentType: 'Territory2',
          created: 'false',
          createdDate: '2019-10-16T01:50:18.000Z',
          deleted: 'false',
          fileName:
           'tm2-main-deployment/territory2Models/Imported_Territory/territories/x101.territory2',
          fullName: 'Imported_Territory.x101',
          problem:
           'Territory rule(s) VT_RULE101 defined in <ruleAssociations> for Imported_Territory.x101 were not found.',
          problemType: 'Error',
          success: 'false' } ],
     componentSuccesses:
      [ { changed: 'true',
          componentType: 'Territory2Rule',
          created: 'true',
          createdDate: '2019-10-16T01:50:18.000Z',
          deleted: 'false',
purvajainnn commented 5 years ago

@VivekMChawla This was the existing rule in the TM1 org , looks like it is getting transformed from - to _ in the sharing rule name ?

image