Add id's to reports. Fixes #1142
parent
ec245fe029
commit
eec207cdac
|
@ -164,10 +164,11 @@ def update_epic_related_userstories_order_in_bulk(bulk_data: list, epic: object)
|
||||||
|
|
||||||
def epics_to_csv(project, queryset):
|
def epics_to_csv(project, queryset):
|
||||||
csv_data = io.StringIO()
|
csv_data = io.StringIO()
|
||||||
fieldnames = ["ref", "subject", "description", "owner", "owner_full_name", "assigned_to",
|
fieldnames = ["id", "ref", "subject", "description", "owner", "owner_full_name",
|
||||||
"assigned_to_full_name", "status", "epics_order", "client_requirement",
|
"assigned_to", "assigned_to_full_name", "status", "epics_order",
|
||||||
"team_requirement", "attachments", "tags", "watchers", "voters",
|
"client_requirement", "team_requirement", "attachments", "tags",
|
||||||
"created_date", "modified_date", "related_user_stories"]
|
"watchers", "voters", "created_date", "modified_date",
|
||||||
|
"related_user_stories"]
|
||||||
|
|
||||||
custom_attrs = project.epiccustomattributes.all()
|
custom_attrs = project.epiccustomattributes.all()
|
||||||
for custom_attr in custom_attrs:
|
for custom_attr in custom_attrs:
|
||||||
|
@ -188,6 +189,7 @@ def epics_to_csv(project, queryset):
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
for epic in queryset:
|
for epic in queryset:
|
||||||
epic_data = {
|
epic_data = {
|
||||||
|
"id": epic.id,
|
||||||
"ref": epic.ref,
|
"ref": epic.ref,
|
||||||
"subject": epic.subject,
|
"subject": epic.subject,
|
||||||
"description": epic.description,
|
"description": epic.description,
|
||||||
|
|
|
@ -78,12 +78,13 @@ def create_issues_in_bulk(bulk_data, callback=None, precall=None, **additional_f
|
||||||
|
|
||||||
def issues_to_csv(project, queryset):
|
def issues_to_csv(project, queryset):
|
||||||
csv_data = io.StringIO()
|
csv_data = io.StringIO()
|
||||||
fieldnames = ["ref", "subject", "description", "sprint", "sprint_estimated_start",
|
fieldnames = ["id", "ref", "subject", "description", "sprint_id", "sprint",
|
||||||
"sprint_estimated_finish", "owner", "owner_full_name", "assigned_to",
|
"sprint_estimated_start", "sprint_estimated_finish", "owner",
|
||||||
"assigned_to_full_name", "status", "severity", "priority", "type",
|
"owner_full_name", "assigned_to", "assigned_to_full_name",
|
||||||
"is_closed", "attachments", "external_reference", "tags", "watchers",
|
"status", "severity", "priority", "type", "is_closed",
|
||||||
"voters", "created_date", "modified_date", "finished_date", "due_date",
|
"attachments", "external_reference", "tags", "watchers",
|
||||||
"due_date_reason"]
|
"voters", "created_date", "modified_date", "finished_date",
|
||||||
|
"due_date", "due_date_reason"]
|
||||||
|
|
||||||
custom_attrs = project.issuecustomattributes.all()
|
custom_attrs = project.issuecustomattributes.all()
|
||||||
for custom_attr in custom_attrs:
|
for custom_attr in custom_attrs:
|
||||||
|
@ -103,9 +104,11 @@ def issues_to_csv(project, queryset):
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
for issue in queryset:
|
for issue in queryset:
|
||||||
issue_data = {
|
issue_data = {
|
||||||
|
"id": issue.id,
|
||||||
"ref": issue.ref,
|
"ref": issue.ref,
|
||||||
"subject": issue.subject,
|
"subject": issue.subject,
|
||||||
"description": issue.description,
|
"description": issue.description,
|
||||||
|
"sprint_id": issue.milestone.id if issue.milestone else None,
|
||||||
"sprint": issue.milestone.name if issue.milestone else None,
|
"sprint": issue.milestone.name if issue.milestone else None,
|
||||||
"sprint_estimated_start": issue.milestone.estimated_start if issue.milestone else None,
|
"sprint_estimated_start": issue.milestone.estimated_start if issue.milestone else None,
|
||||||
"sprint_estimated_finish": issue.milestone.estimated_finish if issue.milestone else None,
|
"sprint_estimated_finish": issue.milestone.estimated_finish if issue.milestone else None,
|
||||||
|
|
|
@ -118,11 +118,16 @@ def snapshot_tasks_in_bulk(bulk_data, user):
|
||||||
|
|
||||||
def tasks_to_csv(project, queryset):
|
def tasks_to_csv(project, queryset):
|
||||||
csv_data = io.StringIO()
|
csv_data = io.StringIO()
|
||||||
fieldnames = ["ref", "subject", "description", "user_story", "sprint", "sprint_estimated_start",
|
fieldnames = ["id", "ref", "subject", "description", "user_story", "sprint_id",
|
||||||
"sprint_estimated_finish", "owner", "owner_full_name", "assigned_to",
|
"sprint", "sprint_estimated_start", "sprint_estimated_finish",
|
||||||
"assigned_to_full_name", "status", "is_iocaine", "is_closed", "us_order",
|
"owner", "owner_full_name",
|
||||||
"taskboard_order", "attachments", "external_reference", "tags", "watchers",
|
"assigned_to",
|
||||||
"voters", "created_date", "modified_date", "finished_date", "due_date",
|
"assigned_to_full_name", "status", "is_iocaine", "is_closed",
|
||||||
|
"us_order",
|
||||||
|
"taskboard_order", "attachments", "external_reference",
|
||||||
|
"tags", "watchers",
|
||||||
|
"voters", "created_date", "modified_date", "finished_date",
|
||||||
|
"due_date",
|
||||||
"due_date_reason"]
|
"due_date_reason"]
|
||||||
|
|
||||||
custom_attrs = project.taskcustomattributes.all()
|
custom_attrs = project.taskcustomattributes.all()
|
||||||
|
@ -144,10 +149,12 @@ def tasks_to_csv(project, queryset):
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
for task in queryset:
|
for task in queryset:
|
||||||
task_data = {
|
task_data = {
|
||||||
|
"id": task.id,
|
||||||
"ref": task.ref,
|
"ref": task.ref,
|
||||||
"subject": task.subject,
|
"subject": task.subject,
|
||||||
"description": task.description,
|
"description": task.description,
|
||||||
"user_story": task.user_story.ref if task.user_story else None,
|
"user_story": task.user_story.ref if task.user_story else None,
|
||||||
|
"sprint_id": task.milestone.id if task.milestone else None,
|
||||||
"sprint": task.milestone.name if task.milestone else None,
|
"sprint": task.milestone.name if task.milestone else None,
|
||||||
"sprint_estimated_start": task.milestone.estimated_start if task.milestone else None,
|
"sprint_estimated_start": task.milestone.estimated_start if task.milestone else None,
|
||||||
"sprint_estimated_finish": task.milestone.estimated_finish if task.milestone else None,
|
"sprint_estimated_finish": task.milestone.estimated_finish if task.milestone else None,
|
||||||
|
|
|
@ -194,12 +194,11 @@ def open_userstory(us):
|
||||||
|
|
||||||
def userstories_to_csv(project, queryset):
|
def userstories_to_csv(project, queryset):
|
||||||
csv_data = io.StringIO()
|
csv_data = io.StringIO()
|
||||||
fieldnames = ["ref", "subject", "description", "sprint",
|
fieldnames = ["id", "ref", "subject", "description", "sprint_id", "sprint",
|
||||||
"sprint_estimated_start",
|
"sprint_estimated_start", "sprint_estimated_finish", "owner",
|
||||||
"sprint_estimated_finish", "owner", "owner_full_name",
|
"owner_full_name", "assigned_to", "assigned_to_full_name",
|
||||||
"assigned_to",
|
"assigned_users", "assigned_users_full_name", "status",
|
||||||
"assigned_to_full_name", "assigned_users",
|
"is_closed"]
|
||||||
"assigned_users_full_name", "status", "is_closed"]
|
|
||||||
|
|
||||||
roles = project.roles.filter(computable=True).order_by('slug')
|
roles = project.roles.filter(computable=True).order_by('slug')
|
||||||
for role in roles:
|
for role in roles:
|
||||||
|
@ -237,9 +236,11 @@ def userstories_to_csv(project, queryset):
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
for us in queryset:
|
for us in queryset:
|
||||||
row = {
|
row = {
|
||||||
|
"id": us.id,
|
||||||
"ref": us.ref,
|
"ref": us.ref,
|
||||||
"subject": us.subject,
|
"subject": us.subject,
|
||||||
"description": us.description,
|
"description": us.description,
|
||||||
|
"sprint_id": us.milestone.id if us.milestone else None,
|
||||||
"sprint": us.milestone.name if us.milestone else None,
|
"sprint": us.milestone.name if us.milestone else None,
|
||||||
"sprint_estimated_start": us.milestone.estimated_start if
|
"sprint_estimated_start": us.milestone.estimated_start if
|
||||||
us.milestone else None,
|
us.milestone else None,
|
||||||
|
|
Loading…
Reference in New Issue