Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix(redmine): update template formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
trowik committed Aug 11, 2021
1 parent 8dbd006 commit 9b1a6f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion timed/redmine/templates/redmine/weekly_report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Estimated hours: {{estimated_hours}}

Reported in last {{last_days}} days:
{% for report in reports %}
{{report.date}} {{report.duration|float_hours|floatformat:2}} {{report.user.get_full_name|ljust:20}} {{report.task.name|ljust:"20"}} {{report.comment|ljust:"100"}}{% if report.not_billable %} "Not Billable"{% endif %}{% if report.review %} "Needs Review"{% endif %}{% endfor %}
{{report.date}} {{report.duration|float_hours|floatformat:2}} {% if report.not_billable %}{{"[NB]"|ljust:"6"}}{% else %}{{""|ljust:"6"}}{% endif %}{% if report.review %}{{"[Rev]"|ljust:"6"}}{% else %}{{""|ljust:"6"}}{% endif %} {{report.user.get_full_name|ljust:20}} {{report.task.name|ljust:"20"}} {{report.comment|ljust:"100"}}{% endfor %}
```
4 changes: 2 additions & 2 deletions timed/redmine/tests/test_redmine_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def test_redmine_report(db, freezer, mocker, report_factory, not_billable, revie
assert "Estimated hours: {0}".format(estimated_hours) in issue.notes
assert "Hours in last 7 days: {0}\n".format(report_hours) in issue.notes
assert report.comment in issue.notes
assert "Not Billable" in issue.notes or not not_billable
assert "Needs Review" in issue.notes or not review
assert "[NB]" in issue.notes or not not_billable
assert "[Rev]" in issue.notes or not review

assert other.comment not in issue.notes, "Only one new line after report line"
issue.save.assert_called_once_with()
Expand Down

0 comments on commit 9b1a6f1

Please sign in to comment.