def jira_task_export_excel(): """ jira task 导出成Excel :return: """ task_ids = request.form.get('task_ids') project_tasks = ProjectBranchTask.query.filter(ProjectBranchTask.id.in_(task_ids.split(','))).all() excel_option = ExcelOptions(os.path.join(current_app.config['TMS_TEMP_DIR'], "%s_jira.xls" % current_user.username)) excel_option.export_task_xls(project_tasks) return excel_option.file_path
def commit_export_excel(): """ jira task 导出成Excel :return: """ commit_ids = request.form.get('commit_ids') commits = ProjectBranchCommit.query.filter(ProjectBranchCommit.id.in_(commit_ids.split(','))).all() excel_option = ExcelOptions(os.path.join(current_app.config['TMS_TEMP_DIR'], "%s_commits.xls" % current_user.username)) excel_option.export_commit_xls(commits) return excel_option.file_path