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

Get a result of a range based on for which day it was provided. #36

Open
lisovsk opened this issue Jan 31, 2019 · 7 comments
Open

Get a result of a range based on for which day it was provided. #36

lisovsk opened this issue Jan 31, 2019 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lisovsk
Copy link

lisovsk commented Jan 31, 2019

When we provide a range can we get the result based on for which day it was provided instead when it was provided?
http://prntscr.com/merjik
It will be more useful.
I really thank you for helping me out.

@mnvx
Copy link
Contributor

mnvx commented Feb 2, 2019

Currently you can find provided spent time in csv (column spent_at):

image

I use date when it was provided in interface, because this approach exclude manipulations with spent time in past.

@lisovsk
Copy link
Author

lisovsk commented Feb 5, 2019

In my case for a specific range I want to now all spent_at times. For that I need a result based on for which day it was provided. Is it hard to fix? Can you explain how fix that?

@mnvx
Copy link
Contributor

mnvx commented Feb 5, 2019

I think it is better to

  • add new filter "Spent At" (filter by spent_at column)
  • rename current column "Spent at" to "Created at"
  • add new column "Spent at" with date from column spent_at

It is not hard. Must be changed next places:

  • repository SpentRepositoryEloquent::getListQuery() - add filter by spent_at by analogue with note.gitlab_created_at
  • view gitpab/time/index_filter_form.blade.php - add filter control (range)
  • view gitpab/time/index_table.blade.blade.php - rename old column and add new column

@mnvx mnvx added good first issue Good for newcomers enhancement New feature or request labels Feb 5, 2019
@lisovsk
Copy link
Author

lisovsk commented Apr 9, 2019

How can I add column with spent_at? I thought I could do it that way - http://prntscr.com/n9keph

@mnvx
Copy link
Contributor

mnvx commented Apr 9, 2019

If you don't plan to push changes, it is simplest way, yes.

If you plan to push changes into this repo, solution described above is recomendated

@lisovsk
Copy link
Author

lisovsk commented Apr 9, 2019

I went through the simplest way but It show date for - gitlab created_at

@mnvx
Copy link
Contributor

mnvx commented Apr 10, 2019

You need to replace next line to {{ \App\Helper\Date::formatDateTime($item->spent_at) }}

And for orderings:

Replace next line to 'column' => 'spent.spent_at',

Also add line 'spent.spent_at', into this array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants