def bug(): """ Create a new bug report for a step. """ print 'controller.bug:' rvars = request.vars print 'vars are', rvars b = Bug(step_id=rvars.step_id, path_id=rvars.path_id, loc_id=rvars.loc_id) print 'created bug object successfully' print 'bug is', b logged = b.log_new(rvars.answer, rvars.log_id, rvars.score) print 'logged bug - response is', logged return dict(success=logged)
def submit_bug(): """ Create a new bug report for a step. The step_id is now being passed in as bug_step_id instead of step_id as it was Apparently conflicting with some other step id: JOB <*****@*****.**> 20141003 """ vbs = True rvars = request.vars if vbs: print('creating::submit_bug: vars are', rvars) b = Bug(step_id=rvars.bug_step_id, path_id=rvars.path_id, loc_id=rvars.loc_id) if vbs: print('creating::submit_bug: created bug object successfully') # if vbs: print 'creating::submit_bug: bug is', b logged = b.log_new(rvars.answer, rvars.log_id, rvars.score, rvars.bug_reporter_comment) if vbs: print('creating::submit_bug: logged bug - response is', logged) return {'success': logged}