Feature Change Request: "On Completion", "On Errors" and "On Success" - Run a command after synchronization

Discuss new features and functions
Posts: 8
Joined: 13 Jan 2020

techtech

Hi everyone,

There is already a great feature to Run a command after synchronization:
"On Completion", "On Errors" and "On Success".

The problem with it is that you can select only one of the three. Why not allow to run one script On Error and another script On Success, especially because this functionality is already there?

Also, why not pass some parameters to the script that is set up to run "On Completion". For example, an error code if there was an error or 0 if it was a success. Even better, a separate parameter for number of warning and one for number of errors.

The same parameters could be passed to the "On Errors" script so it could be known to the script not only if there was a fact of an error but some specific codes of those errors and warnings.

It seems like such a natural thing to do with very minimal coding because almost all of this functionality is already there.

Thank you everyone. Hope this contribution helps quite a few people.
User avatar
Posts: 2275
Joined: 22 Aug 2012

Plerry

By invoking FFS from a script (see Command line usage), you can evaluate the return value/exit code and take action accordingly.
Posts: 8
Joined: 13 Jan 2020

techtech

Thank you for the suggestion. Yes it is technically doable.

Although I would very much prefer not to add more layers of complexity. Adding more scripts adds more places where things can go wrong. Why invent a wheel if this functionality is already there?

It would take only a few extra lines of code to use both "On Errors" and "On Success", if both are defined, instead of choosing only one of them.

(ok, maybe a few more lines to pass one or more parameters if this is also chosen to be implemented)

Hope it makes sense to de-clutter and simplify rather than using workarounds requiring more work.

Would't you agree that what I am proposing is a more elegant approach for this particular software and a better programming (User Interface) practice in general?

Thank you everyone again.