Task: Button to Duplicate Open Task and Mark one as "Completed"

Task: Button to Duplicate Open Task and Mark one as "Completed"

I wonder if someone can help me write a function that will do the following. In the "Edit Task" Screen, similar to "Save and add new" button, I want to go one step further and create a button that will "Close and Duplicate" the open task:
  1. Mark the currently open task as "Completed"
  2. Create a clone of the current task.
  3. Open the newly cloned Task.
  4. Mark new task as "Not Started"
  5. Remove "Due Date" from new task.
  6. Leave new task open so I can modify it with new information such as a new date, higher priority, etc.
The reason this would be useful would be for when  we complete a task but have to repeat the task but with a new deadline.  An example is a task that tells us to "email client to ask for an update", which would be completed and need to be repeated again with a new deadline. When there are multiple fields filled in, this would be a huge time saver.