Add option to sort migrations by migration_id

Created on 26 September 2017, about 7 years ago
Updated 18 June 2024, 6 months ago

The migrate-status list is not sorted alphabetically, like the Migrate UI does, which makes it hard to e.g. find a new migration you just added.

Before:

$ drush --root=web ms             
 Group: FIS Data Imports (fis)  Status        Total  Imported  Unprocessed  Last imported       
 backers                        Idle          7      0         7            2017-09-07 08:52:07 
 funding_term                   Idle          4      0         4                                
 scholarship_term               Idle          6      0         6            2017-09-14 14:39:38 
 scientific_discipline_term     Idle          7      0         7                                
 target_audience_term           Idle          7      7         0            2017-09-26 13:42:22 
 thesis_term                    Idle          7      0         7            2017-09-07 08:52:10 
...

after:

$ drush --root=web ms                               
 Group: FIS Data Imports (fis)  Status  Total  Imported  Unprocessed  Last imported       
 backers                        Idle    7      0         7            2017-09-07 08:52:07 
 cooperation_term               Idle    6      0         6            2017-09-07 08:52:39 
 event_types_term               Idle    8      0         8            2017-09-07 08:52:50 
 funding_term                   Idle    4      0         4                                
 publications_node              Idle    368    0         368          2017-09-21 16:07:14 
 research_trip_term             Idle    2      0         2            2017-09-07 08:52:11 
...
πŸ› Bug report
Status

Needs work

Version

4.0

Component

Drush commands

Created by

πŸ‡©πŸ‡ͺGermany pektinasen

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States uberhacker

    Not sure what the logic is behind a default sort by order of execution. I'm seeing the taxonomy terms at the bottom and user migrations all over the map in my migration status list. These should be near the top for dependency precedence "order of execution" to make sense. Sorting alphabetically helps when viewing a long list with similar migration ids. It would be ideal to ultimately add an option to sort by any table column. The groundwork is included in the attached patch.

Production build 0.71.5 2024