Created
March 30, 2017 15:22
-
-
Save leojpod/05d60a80504ce19d6a60f351acb050c8 to your computer and use it in GitHub Desktop.
the better way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assignTo : String -> Item -> Item | |
assignTo user task = | |
let | |
updateAssignee taskProperties = | |
{ taskProperties | assignee = Just user } | |
in | |
case task of | |
Task props -> | |
Task (updateAssignee props) | |
SubTask props -> | |
SubTask (updateAssignee props) | |
Bug props -> | |
Bug (updateAssignee props) | |
Epic props -> | |
Epic props -- i.e. remain unchanged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment