RocketChat / Opensource-Contribution-Leaderboard

Open Source project contributors tracking leaderboard built with :heart: in NodeJS 😉
https://gsoc.rocket.chat
MIT License
39 stars 46 forks source link

[FEATURE] Added Feature to use End Date. #70

Closed yash-rajpal closed 3 years ago

yash-rajpal commented 3 years ago

Proposed Changed

Added a new feature for admin to select contributions between a range of dates. Also added a checkBox to enable or disable the end date feature.

Usage

If the checkbox is disabled, whole project works as it used to work before this PR. If the checkbox is enabled, we can set a custom end date to select contributions between a range of dates.

Changes made

added endDate to config, to track and date value set by user. added endDateCheckbox, to track if user has enabled the checkbox or not. The value of this checkbox also shapes the URL's and API calls of github. If checkbox is disabled everything works as it used to work before. If the checkbox is enabled, the API calls and urls change accordingly. ( created:>=startDate for normal and created:startDate..EndDate for using endDate as well.

ScreenShots

Admin Panel

image

Checkbox enabled and end date set as 15-08-2020

see lolimay's PRs are shown as 35 in that date range, but in total till date he has 42 PRs. image

When we disable end Date checkbox

Now it shows total contributions by lolimay till date from start Date. image

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert when merging 29d35d0828cb63330b4966e4b5d628be57aeaefb into 8a323e1f047a6b51be363f2ec4f882808f02ddbd - view on LGTM.com

new alerts:

yash-rajpal commented 3 years ago

What do you guys think about this? @Sing-Li @RonLek @djcruz93 @lolimay ? Thanks.

im-adithya commented 3 years ago

What is the use of refresh interval/update when you set an end date? I think it is better to disable refresh on checking Use End Date as well.

yash-rajpal commented 3 years ago

Ohh I get it now what you are asking.

Yeah in that case we can disable the check box. Some organizations can make use of this feature.

Just for example when application period begins for gsoc, rocket chat can tell that this if last date for ones contributions to be counted towards gsoc leaderboard and later they can easily evaluate the work in the between period.

Without an end date it can be difficult to evaluate the work afterwards, I think.

Also some other orgs can make use of this.

im-adithya commented 3 years ago

No not that, I mean once you set an end date the data is not going to be changed. So there is no use of update right?

yash-rajpal commented 3 years ago

@im-adithya Please refer above comment, I updated it.

Sing-Li commented 3 years ago

Sorry @yash-rajpal There is really no need for end date on this leaderboard. (and most leaderboards)

I strongly suggest that you first propose with a "Feature Request" before starting to code the next time. Let the team have a chance to discuss your proposal to avoid wasted effort.

I am going to close this now.

yash-rajpal commented 3 years ago

Okay. No problems @Sing-Li , I got learn about the project base and GitHub APIs by working on this, so not all efforts wasted after all. 😃