#NEWLINE# def new_task( self ) : #NEWLINE# #INDENT# selected_item = self . view . taskboard . widget . get_focus ( ) [ 0 ] #NEWLINE# if isinstance ( task , UserStoryEntry ) : #NEWLINE# #INDENT# task = { #NEWLINE# #INDENT# 'user_story' : selected_item . user_story . get ( 'id' , None ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( selected_item , TaskEntry ) : #NEWLINE# #INDENT# task = { #NEWLINE# #INDENT# 'user_story' : selected_item . task . get ( 'user_story' , None ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# task = { #NEWLINE# #INDENT# 'user_story' : None , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# self . view . open_task_form ( task = task ) #NEWLINE# signals . connect ( self . view . task_form . cancel_button , 'click' , ( lambda _ : self . cancel_task_form ( ) ) ) #NEWLINE# signals . connect ( self . view . task_form . save_button , 'click' , ( lambda _ : self . handle_create_task_request ( ) ) )