Displaying completed and failed wuuks using one or two functions
I used to do this sort of "optimisation" 20 years ago.  I don't anymore.  Clarity of code is more important.  I would rather have fewer parameters and properly named functions.  This way, you can just read the code without worrying about how the function works.

If you do what you are proposing, then to understand the code, you have to look at the what the function is doing every time it is used !!!

EDIT
An example of what I have just finished doing at work.  The original procedure was called Launch_Client_Form with a whole bunch of parameters.  It had four functions and the parameters of all 4 functions had to be passed each time.  I created 4 procedures


View_Client
Create_Client
Edit_Client
Find_Client


Each one has only the parameters it requires.  Internally they all still call Launch_Client_Form.  Now, when you encounter Edit_Client in the code, it does not require a comment and you know what it is going to do.