Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nevergone created an issue. See original summary.

nevergone’s picture

Status: Active » Needs review
FileSize
597 bytes

before:
Tag: foobar Status Total Imported Unprocessed
foobar_url_alias Idle 102 0 102
foobar_user Idle 215 30 185

after:
Tag: foobar Status Total Imported Unprocessed
foobar_url_alias Idle 102 0 (0%) 102 (100%)
foobar_user Idle 215 30 (14%) 185 (86%)

nevergone’s picture

fix "Division by zero" error.

nevergone’s picture

Patch re-rolled.

claudiu.cristea’s picture

+++ b/migrate_run.drush.inc
@@ -232,6 +232,10 @@ function drush_migrate_run_migrate_status($migration_ids = '') {
+                $imported .= ' (' . round(($imported / $source_rows) * 100, 1) . '%)';
+                $unprocessed .= ' (' . round(($unprocessed / $source_rows) * 100, 1) . '%)';

Thank you for this feature. I applied the patch and at a first look seems that the table is cluttered, making it hard to read. I think we can add only the imported percent, the unprocessed being too much and redundant.

How about that?

nevergone’s picture

FileSize
540 bytes
467 bytes

You're right. Please review.

claudiu.cristea’s picture

We are almost there, thank you.

+++ b/migrate_run.drush.inc
@@ -232,6 +232,9 @@ function drush_migrate_run_migrate_status($migration_ids = '') {
+              if ($source_rows > 0) {

Let's avoid the percentage also when $imported is 0. It doesn't have any relevance showing 0 (0%).

if ($source_rows > 0 && $imported > 0) {
claudiu.cristea’s picture

Status: Needs review » Needs work
nevergone’s picture

Status: Needs work » Needs review
FileSize
557 bytes
451 bytes

Please review.

claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community

  • claudiu.cristea committed f516b3f on 8.x-1.x
    Issue #2843688 by nevergone, claudiu.cristea: Add percent for migrate-...
claudiu.cristea’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thank you @nevergone.

Status: Fixed » Closed (fixed)

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