Skip to content

Report filter module #140#143

Merged
dominikbraun merged 5 commits intodominikbraun:mainfrom
KonstantinGasser:report_filter_module#140
Jul 10, 2021
Merged

Report filter module #140#143
dominikbraun merged 5 commits intodominikbraun:mainfrom
KonstantinGasser:report_filter_module#140

Conversation

@KonstantinGasser
Copy link
Copy Markdown
Contributor

closing #140

sample output:

// no filter by module but project has multiple modules
+-----------+----------+-----------------------+---------+-------+------------+-----------+
|  PROJECT  |  MODULE  |         DATE          |  START  |  END  |  BILLABLE  |   TOTAL   |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
| test      | mod1     | Sunday, 27. June 2021 | 18:11   | 18:11 | no         |           |
+           +----------+-----------------------+---------+-------+------------+-----------+
|           | mod1     | Sunday, 27. June 2021 | 21:53   | 22:53 | no         |           |
+           +----------+-----------------------+---------+-------+------------+-----------+
|           | mod2     | Sunday, 27. June 2021 | 21:54   | 22:54 | no         |           |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
|           |          |                       |         |       | ∑          | 2h 0min   |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
|                                                                  TOTAL      | 2H 0MIN   |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
// filter by mod1 for project with modules
+-----------+----------+-----------------------+---------+-------+------------+-----------+
|  PROJECT  |  MODULE  |         DATE          |  START  |  END  |  BILLABLE  |   TOTAL   |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
| test      | mod1     | Sunday, 27. June 2021 | 18:11   | 18:11 | no         |           |
+           +----------+-----------------------+---------+-------+------------+-----------+
|           | mod1     | Sunday, 27. June 2021 | 21:53   | 22:53 | no         |           |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
|           |          |                       |         |       | ∑          | 1h 0min   |
+-----------+----------+-----------------------+---------+-------+------------+-----------+
|                                                                  TOTAL      | 1H 0MIN   |
+-----------+----------+-----------------------+---------+-------+------------+-----------+

@KonstantinGasser KonstantinGasser changed the title Report filter module#140 Report filter module #140 Jun 27, 2021
Copy link
Copy Markdown
Collaborator

@aligator aligator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :-)
Didn't try it out yet, but I found a small typo.

Comment thread core/reporter.go Outdated
Comment on lines +18 to +19
// FilterBillable returns a records if its IsBillable flag matches the paramter display
func FilterBillable(dislay bool) func(*Record) bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just rewording the comment. And a small typo in the param.

Suggested change
// FilterBillable returns a records if its IsBillable flag matches the paramter display
func FilterBillable(dislay bool) func(*Record) bool {
// FilterBillable returns a record filter for the billable flag that filters based on the passed display value
func FilterBillable(display bool) func(*Record) bool {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes that's a little weird, I will fix that..thanks!

@dominikbraun dominikbraun added this to the timetrace v0.12.0 milestone Jun 28, 2021
@dominikbraun dominikbraun self-requested a review July 10, 2021 20:29
Copy link
Copy Markdown
Owner

@dominikbraun dominikbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for implementing this! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants