Generate email notification for End cycle

Hi 

This pull request implements the email notification for End cycle using is_current attribute.
Also merges the earlier pull request and resolve merge conflicts with develop branch.

Regards
Mouli
Nothing major. But good to get in the habit of using switch/case statements for logic like this.