#NEWLINE# def process( args ) : #NEWLINE# #INDENT# if ( args . title and ( not args . title . strip ( ) ) ) : #NEWLINE# #INDENT# print ( 'you must supply a non-empty title' , file = sys . stderr ) #NEWLINE# return 1 #NEWLINE# #UNINDENT# conduit = phlsys_makeconduit . make_conduit ( args . uri , args . user , args . cert , args . act_as_user ) #NEWLINE# priority = None #NEWLINE# if ( args . priority is not None ) : #NEWLINE# #INDENT# priority = phlcon_maniphest . PRIORITIES [ args . priority ] #NEWLINE# #UNINDENT# user_phids = phlcon_user . UserPhidCache ( conduit ) #NEWLINE# if args . owner : #NEWLINE# #INDENT# user_phids . add_hint ( args . owner ) #NEWLINE# #UNINDENT# if args . ccs : #NEWLINE# #INDENT# user_phids . add_hint_list ( args . ccs ) #NEWLINE# #UNINDENT# owner = ( user_phids . get_phid ( args . owner ) if args . owner else None ) #NEWLINE# ccs = ( [ user_phids . get_phid ( u ) for u in args . ccs ] if args . ccs else None ) #NEWLINE# projects = None #NEWLINE# if args . projects : #NEWLINE# #INDENT# project_to_phid = phlcon_project . make_project_to_phid_dict ( conduit ) #NEWLINE# projects = [ project_to_phid [ p ] for p in args . projects ] #NEWLINE# #UNINDENT# result = phlcon_maniphest . update_task ( conduit , args . id , args . title , args . description , priority , owner , ccs , projects , args . comment ) #NEWLINE# if args . format_id : #NEWLINE# #INDENT# print ( result . id ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if args . format_url : #NEWLINE# #INDENT# print ( result . uri ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# message = "Updated task '{task_id}', you can view it at this URL:\n  {url}" . format ( task_id = result . id , url = result . uri ) #NEWLINE# print ( message )