fixed bug to do with calculating durations
Fixes a couple of small bugs while calculating durations in cycle analytics - probably due to some bad refactoring
- 
Changelog entry added 
- Tests
- 
Added for this feature/bug 
- 
All builds are passing 
 
- 
- 
Conform by the merge request performance guides 
- 
Conform by the style guides 
- 
Branch has no merge conflicts with master(if it does - rebase it please)
- 
Squashed related commits together