Including created, modified and finished dates in tasks csv reports
parent
c9c66238bd
commit
b00ba4a968
|
@ -5,6 +5,7 @@
|
||||||
### Features
|
### Features
|
||||||
- Now comment owners and project admins can edit existing comments with the history Entry endpoint.
|
- Now comment owners and project admins can edit existing comments with the history Entry endpoint.
|
||||||
- Add a new permissions to allow add comments instead of use the existent modify permission for this purpose.
|
- Add a new permissions to allow add comments instead of use the existent modify permission for this purpose.
|
||||||
|
- Include created, modified and finished dates for tasks in CSV reports
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
- Lots of small and not so small bugfixes.
|
- Lots of small and not so small bugfixes.
|
||||||
|
|
|
@ -99,7 +99,8 @@ def tasks_to_csv(project, queryset):
|
||||||
fieldnames = ["ref", "subject", "description", "user_story", "sprint", "sprint_estimated_start",
|
fieldnames = ["ref", "subject", "description", "user_story", "sprint", "sprint_estimated_start",
|
||||||
"sprint_estimated_finish", "owner", "owner_full_name", "assigned_to",
|
"sprint_estimated_finish", "owner", "owner_full_name", "assigned_to",
|
||||||
"assigned_to_full_name", "status", "is_iocaine", "is_closed", "us_order",
|
"assigned_to_full_name", "status", "is_iocaine", "is_closed", "us_order",
|
||||||
"taskboard_order", "attachments", "external_reference", "tags", "watchers", "voters"]
|
"taskboard_order", "attachments", "external_reference", "tags", "watchers", "voters",
|
||||||
|
"created_date", "modified_date", "finished_date"]
|
||||||
|
|
||||||
custom_attrs = project.taskcustomattributes.all()
|
custom_attrs = project.taskcustomattributes.all()
|
||||||
for custom_attr in custom_attrs:
|
for custom_attr in custom_attrs:
|
||||||
|
@ -141,6 +142,9 @@ def tasks_to_csv(project, queryset):
|
||||||
"tags": ",".join(task.tags or []),
|
"tags": ",".join(task.tags or []),
|
||||||
"watchers": task.watchers,
|
"watchers": task.watchers,
|
||||||
"voters": task.total_voters,
|
"voters": task.total_voters,
|
||||||
|
"created_date": task.created_date,
|
||||||
|
"modified_date": task.modified_date,
|
||||||
|
"finished_date": task.finished_date,
|
||||||
}
|
}
|
||||||
for custom_attr in custom_attrs:
|
for custom_attr in custom_attrs:
|
||||||
value = task.custom_attributes_values.attributes_values.get(str(custom_attr.id), None)
|
value = task.custom_attributes_values.attributes_values.get(str(custom_attr.id), None)
|
||||||
|
|
|
@ -177,6 +177,6 @@ def test_custom_fields_csv_generation():
|
||||||
data.seek(0)
|
data.seek(0)
|
||||||
reader = csv.reader(data)
|
reader = csv.reader(data)
|
||||||
row = next(reader)
|
row = next(reader)
|
||||||
assert row[21] == attr.name
|
assert row[24] == attr.name
|
||||||
row = next(reader)
|
row = next(reader)
|
||||||
assert row[21] == "val1"
|
assert row[24] == "val1"
|
||||||
|
|
Loading…
Reference in New Issue