Sentaroh/SMBSync2

bugs in sync task name and schedule name

Closed this issue · 10 comments

Hi,

I pushed a patch fixing some bugs introduced by your last commit that broke some checks in Sync tasks
I also fixed that renaming sync tasks and schedules could be done using invalid chars, duplicates or empty names

Before:

  • Schedule 1 has empty name !

Screenshot_1599159955

  • Two tasks with same name possible !

Screenshot_1599160020

  • Sync task 1 has empty name !

Screenshot_1599160028

After:

  • notify of errors in sync tasks

Screenshot_1599169707

  • do not allow saving existing tasks by editing them

Screenshot_1599169995

Screenshot_1599170002

  • fix renaming of schedule and task names

Screenshot_1599173881

Screenshot_1599173892

Screenshot_1599173927

Edit: fixed in last commit
To fix:

If some task names are invalid, we should set the sti.isSyncTaskError to true to disable AutoSync and sync selected

Currently, with my patch, I disable the sync button for tasks
But the below situation, Top Sync Button will AutoSync despite first task has no name at all (empty name)

Screenshot_1599169707

I can hide it too, but not sure if hiding top sync button is enough (call by external scripts), so I think sti.isSyncTaskError should be set

I let you decide and fix that part as you think it is better: disable topsync button if invalid tasks selected or in Auto vs set the task sti.isSyncTaskError so that external scripts do not start the bad task name

Best regards

Commit: Fix main tabs notification message for schedule errors…

Before:
Screenshot_1599203416

After:

  • Detailed log with all schedules and tasks having an error:

Untitled

  • display all invalid tasks in editor

Screenshot_1599203624

  • show a generic message in main tabs

Screenshot_1599210972

Screenshot_1599210976

Commit: Fix schedule error message not always refreshed

  • Notification error is refreshed when schedules are disabled individually or globally

Screenshot_1599213985

Screenshot_1599213994

commit: Fix duplicate sync tasks detection:

Screenshot_1599231529

  • properly loads all tasks in settings so that we can edit/fix them and not keep them not accessible in settings
  • display error sync task names for duplicates and non valid chars

Commit: properly set Sync Tasks with invalid name as erroring:

Screenshot_1599236350

This completes all the fixes properly, without needing to save to settings files
If task name is not valid (duplicate, invalid char...), sync task is now error and will not be started by Top Sync button (in AUto or Select modes), by schedules, external scripts...

Let me know if any bugs are present

Best regards

Commit: Fix bug where duplicate schedules by name case could be created

  • fix type

Screenshot_1599248764

  • fix display and creation of schedule duplicates by case name

Screenshot_1599254110

commit: Fix GUI bug when schedule item is deleted

  • After a schedule item was deleted, the GUI was in a "bug" state:
    bottom context buttons no more shown on item selection

Screenshot_1599259029

I am done
Will wait for merging before I continue on a small GUI aspect bugs

Best regards

Thank you.

We have applied your changes and made some modifications.

Best regards.

Thank you, I missed the meaning of "EDIT"

Best regards