-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Reserve bounty improvements #5066
Reserve bounty improvements #5066
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5066 +/- ##
==========================================
- Coverage 31.03% 31.02% -0.01%
==========================================
Files 218 218
Lines 17515 17533 +18
Branches 2404 2409 +5
==========================================
+ Hits 5436 5440 +4
- Misses 11856 11870 +14
Partials 223 223
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #5066 +/- ##
==========================================
+ Coverage 30.71% 30.78% +0.07%
==========================================
Files 221 221
Lines 17870 17941 +71
Branches 2469 2491 +22
==========================================
+ Hits 5489 5524 +35
- Misses 12155 12187 +32
- Partials 226 230 +4
Continue to review full report at Codecov.
|
@vince0656 nice ! mind opening a draft PR going forward so that it's extra clear that the PR is not ready for review ? |
Sure! I've updated the title. Is that sufficient or is there anything else I need to do to make it clear it's a draft PR? |
@vince0656 Hey Vincent - when you create a new PR, theres an option to create it as a normal PR, or a draft PR. The difference is that it doesn't ping us for reviews until you set it ready for review if its a draft PR 👍 |
e4dc0e8
to
10a45ff
Compare
sweet looks like we making progress ^_^ |
5cd20ca
to
5c2f1ef
Compare
@danlipert @thelostone-mc @PixelantDesign All good to go 👍 |
delta = self.reserved_for_user_expiration - self.reserved_for_user_from | ||
days = delta.days | ||
|
||
if days > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a simpler way we can humanize the timedelta? https://anandnalya.com/2009/05/humanizing-the-time-difference-in-django/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Dan. I'm not sure what you mean? I've had a look at the link you sent and we would still need to do calcs for hours. Additionally, the humanised timedelta outputs seem different compared to the current requirement of allowing a funder to reserve for '3 days', '1 week' or 'Keep reserved'. I tried to make the code as scalable as possible and struggled to find easier ways of doing this. It's a shame the timedelta object doesn't have an hours getter attribute or even a weeks one which is strange as you can construct a timedelta with weeks, days, hours, minutes etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danlipert any thoughts on my comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me excitedddddd
I’m excited too! Any thoughts @danlipert? |
@octavioamu Will fix the build issues when I get a chance |
685a66c
to
35c5141
Compare
@octavioamu @thelostone-mc All good to go 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
d5d79d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just notice we need to recreate the migrations @vince0656
08252d2
cd37a16
to
08252d2
Compare
Description
Inprovements to the reserve bounty functionality including a new 'reserved' state for bounties so that they don't show up on the issue explorer when users are searching for 'open' bounties
Refers/Fixes
#3544
Testing
Appropriate unit tests have been added
Video demonstration
https://drive.google.com/open?id=1-WZrPWReWAC2h6-u54FmU7phD9GX9iCA