Problem/Motivation

If running drush migrate:import with the --sync flag, while nothing needs to be synced (removed on the destination), the drush command will still output "Rolled back 1 item - done with '@name", because 0 is considered a singular value.
This is confusing, as one may think that an item got deleted, while none was.

Steps to reproduce

Consecutively run drush migrate:import --all and drush migrate:import --all --sync . Drush will output "Rolled back 1 item - done with '@name'", while nothing has changed.

Proposed resolution

Either print "No item has been rolled back - done with '@name'" (approach chosen in MR), or do not print anything if nothing got removed.

Remaining tasks

Review MR

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nanak created an issue. See original summary.

nanak’s picture

Title: Use specific rollback message during sync during sync if no item was rolled back » Use more accurate rollback message during sync if no item was rolled back
Assigned: nanak » Unassigned
Issue summary: View changes
Status: Active » Needs review
heddn’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.