Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report filter module #140 #143

Merged

Conversation

KonstantinGasser
Copy link
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
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.

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
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
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
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