drag and drop reordering of Filters include/exclude patterns is not preserved (original) (raw)

Describe the bug

To Reproduce

  1. In the Settings > Users tab, select "Include All" for all users.
    User Home Exclude All Include Hidden Include All
    user1 /home/user1 ( ) ( ) (x)
    root /root ( ) ( ) (x)
  2. Because of the change made in step 1 above, the Settings > Filters tab contains two rules that are automatically added.
    plus minus Pattern
    (x) ( ) + /root/**
    (x) ( ) + /home/user1/**
  3. Click OK to save changes.
  4. Next, add an exclude pattern to Settings > Filters.
    I want to exclude a particularly large virtual machine directory. Click the Add Folders button, and enter /home/user1/VirtualBox VMs/build1/***. The rule is added to the end of the list of patterns.
    plus minus Pattern
    (x) ( ) + /root/**
    (x) ( ) + /home/user1/**
    ( ) (x) - /home/user1/VirtualBox VMs/build1/***
  5. Because of rsync rules precedence, the "exclude" pattern for a folder within the user's home directory must be listed before the the user's home directory "include" pattern.
    Drag and drop the exclude pattern so that it is the 2nd pattern in the list.
    plus minus Pattern
    (x) ( ) + /root/**
    ( ) (x) - /home/user1/VirtualBox VMs/build1/***
    (x) ( ) + /home/user1/**
  6. Click OK to save changes.
  7. Go back into Settings > Filters, and notice that the re-ordering of the patterns was not preserved. Despite the changes made in step 5, the pattern still appears as in step 4.
    Although the GUI allows the reordering of patterns, the reordering is not preserved. This is confirmed within the /etc/timeshift.json file under the exclude key.
# cat /etc/timeshift.json  | jq .  
{  
  "backup_device_uuid": "abcdef12-3456-44b3-8fc5-3bff5977154a",  
  "parent_device_uuid": "",  
  "do_first_run": "false",  
  "btrfs_mode": "false",  
  "include_btrfs_home_for_backup": "false",  
  "include_btrfs_home_for_restore": "false",  
  "stop_cron_emails": "true",  
  "btrfs_use_qgroup": "true",  
  "schedule_monthly": "true",  
  "schedule_weekly": "true",  
  "schedule_daily": "true",  
  "schedule_hourly": "true",  
  "schedule_boot": "false",  
  "count_monthly": "3",  
  "count_weekly": "5",  
  "count_daily": "7",  
  "count_hourly": "12",  
  "count_boot": "5",  
  "snapshot_size": "0",  
  "snapshot_count": "609815",  
  "date_format": "%Y-%m-%d %H:%M:%S",  
  "exclude": [  
    "+ /root/**",  
    "+ /home/user1/**",  
    "/home/user1/VirtualBox VMs/build1/***"  
  ],  
  "exclude-apps": []  
}  

Expected behavior

Work-Around

System: