-
-
Notifications
You must be signed in to change notification settings - Fork 773
Reserve Bounties #2163
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 Bounties #2163
Conversation
- Ability to search and add a reservedFor user for a particular gitcoin issue - The reservedFor user is saved in the database together with the time they were created - The dashboard models have been updated to reflect this Partially fixes: #2037
app/assets/v2/js/pages/new_bounty.js
Outdated
| last_sync: new Date() | ||
| }; | ||
|
|
||
| var reservedFor = ""; |
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.
Strings must use singlequote. (quotes)
app/assets/v2/js/pages/new_bounty.js
Outdated
| }); | ||
|
|
||
| // listen to reserved for changes | ||
| $('#reservedFor').on('select2:select', function (e) { |
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.
Unexpected space before function parentheses. (space-before-function-paren)
|
|
||
| // listen to reserved for changes | ||
| $('#reservedFor').on('select2:select', function (e) { | ||
| var data = e.params.data; |
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.
Expected blank line after variable declarations. (newline-after-var)
app/assets/v2/js/pages/new_bounty.js
Outdated
| experienceLevel: data.experience_level, | ||
| projectLength: data.project_length, | ||
| bountyType: data.bounty_type, | ||
| reservedFor:reservedFor, |
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.
Missing space before value for key 'reservedFor'. (key-spacing)
app/assets/v2/js/pages/new_bounty.js
Outdated
| projectLength: data.project_length, | ||
| bountyType: data.bounty_type, | ||
| reservedFor:reservedFor, | ||
| reservedForCreationDate:reservedFor !==""?new Date():null, |
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.
Missing space before value for key 'reservedForCreationDate'. (key-spacing)
Infix operators must be spaced. (space-infix-ops)
Strings must use singlequote. (quotes)
app/dashboard/helpers.py
Outdated
| 'bounty_owner_address': bounty_issuer.get('address', ''), | ||
| 'bounty_owner_email': bounty_issuer.get('email', ''), | ||
| 'bounty_owner_name': bounty_issuer.get('name', ''), | ||
| 'bounty_reserved_for':metadata.get('reservedFor', ''), |
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.
E231 missing whitespace after ':'
app/dashboard/helpers.py
Outdated
| 'bounty_owner_email': bounty_issuer.get('email', ''), | ||
| 'bounty_owner_name': bounty_issuer.get('name', ''), | ||
| 'bounty_reserved_for':metadata.get('reservedFor', ''), | ||
| 'bounty_reserved_for_creation_date':metadata.get('reservedForCreationDate', ''), |
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.
E231 missing whitespace after ':'
app/dashboard/helpers.py
Outdated
| 'github_comments', 'override_status', 'last_comment_date', 'snooze_warnings_for_days', | ||
| 'admin_override_and_hide', 'admin_override_suspend_auto_approval', 'admin_mark_as_remarket_ready' | ||
| 'admin_override_and_hide', 'admin_override_suspend_auto_approval', 'admin_mark_as_remarket_ready', | ||
| 'bounty_reserved_for','bounty_reserved_for_creation_date' |
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.
E231 missing whitespace after ','
|
|
||
| var build_detail_page = function(result) { | ||
| var set_reserved_for_link = function(result) { | ||
| if(result.bounty_reserved_for !== '') { |
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.
Expected indentation of 2 spaces but found 4. (indent)
Expected space(s) after "if". (keyword-spacing)
| var build_detail_page = function(result) { | ||
| var set_reserved_for_link = function(result) { | ||
| if(result.bounty_reserved_for !== '') { | ||
| var profile_link = 'https://gitcoin.co/profile/'+result.bounty_reserved_for; |
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.
Expected indentation of 4 spaces but found 6. (indent)
Infix operators must be spaced. (space-infix-ops)
| var set_reserved_for_link = function(result) { | ||
| if(result.bounty_reserved_for !== '') { | ||
| var profile_link = 'https://gitcoin.co/profile/'+result.bounty_reserved_for; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+result.bounty_reserved_for+'</a>'; |
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.
Expected indentation of 4 spaces but found 6. (indent)
Infix operators must be spaced. (space-infix-ops)
| if(result.bounty_reserved_for !== '') { | ||
| var profile_link = 'https://gitcoin.co/profile/'+result.bounty_reserved_for; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+result.bounty_reserved_for+'</a>'; | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="30" height="30"/>`; |
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.
Expected indentation of 4 spaces but found 6. (indent)
Expected blank line after variable declarations. (newline-after-var)
| var profile_link = 'https://gitcoin.co/profile/'+result.bounty_reserved_for; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+result.bounty_reserved_for+'</a>'; | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="30" height="30"/>`; | ||
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); |
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.
Expected indentation of 4 spaces but found 6. (indent)
Infix operators must be spaced. (space-infix-ops)
Trailing spaces not allowed. (no-trailing-spaces)
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="30" height="30"/>`; | ||
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); | ||
| } | ||
| else { |
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.
Expected indentation of 2 spaces but found 4. (indent)
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); | ||
| } | ||
| else { | ||
| $('#bounty_reserved_for').css('display', 'none'); |
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.
Expected indentation of 4 spaces but found 6. (indent)
| } | ||
| else { | ||
| $('#bounty_reserved_for').css('display', 'none'); | ||
| } |
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.
Expected indentation of 2 spaces but found 4. (indent)
app/dashboard/router.py
Outdated
| 'fulfillment_submitted_on', 'fulfillment_started_on', 'canceled_on', 'action_urls', 'project_type', | ||
| 'permission_type', 'attached_job_description', 'needs_review', 'github_issue_state', 'is_issue_closed', | ||
| 'additional_funding_summary', 'paid', | ||
| 'additional_funding_summary', 'paid','bounty_reserved_for','bounty_reserved_for_creation_date', |
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.
E231 missing whitespace after ','
app/dashboard/views.py
Outdated
| params['stdbounties_id'] = bounty.standard_bounties_id if not stdbounties_id else stdbounties_id | ||
| params['interested_profiles'] = bounty.interested.select_related('profile').all() | ||
| params['avatar_url'] = bounty.get_avatar_url(True) | ||
|
|
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.
W293 blank line contains whitespace
Codecov Report
@@ Coverage Diff @@
## master #2163 +/- ##
==========================================
- Coverage 27.83% 27.74% -0.09%
==========================================
Files 137 141 +4
Lines 11207 11377 +170
Branches 1512 1544 +32
==========================================
+ Hits 3119 3157 +38
- Misses 7978 8110 +132
Partials 110 110
Continue to review full report at Codecov.
|
…er for the reserved for bounty
|
|
||
| var build_detail_page = function(result) { | ||
| var set_reserved_for_link = function(result) { | ||
| if(!$.isEmptyObject(result.bounty_reserved_for)) { |
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.
Expected indentation of 2 spaces but found 4. (indent)
Expected space(s) after "if". (keyword-spacing)
| var build_detail_page = function(result) { | ||
| var set_reserved_for_link = function(result) { | ||
| if(!$.isEmptyObject(result.bounty_reserved_for)) { | ||
| var reservedForUsername = result.bounty_reserved_for.username; |
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.
Expected indentation of 4 spaces but found 6. (indent)
| var set_reserved_for_link = function(result) { | ||
| if(!$.isEmptyObject(result.bounty_reserved_for)) { | ||
| var reservedForUsername = result.bounty_reserved_for.username; | ||
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; |
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.
Expected indentation of 4 spaces but found 6. (indent)
Infix operators must be spaced. (space-infix-ops)
| if(!$.isEmptyObject(result.bounty_reserved_for)) { | ||
| var reservedForUsername = result.bounty_reserved_for.username; | ||
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+reservedForUsername+'</a>'; |
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.
Expected indentation of 4 spaces but found 6. (indent)
Infix operators must be spaced. (space-infix-ops)
| var reservedForUsername = result.bounty_reserved_for.username; | ||
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+reservedForUsername+'</a>'; | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; |
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.
Expected indentation of 4 spaces but found 6. (indent)
Expected blank line after variable declarations. (newline-after-var)
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; | ||
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); | ||
| } | ||
| else { |
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.
Expected indentation of 2 spaces but found 4. (indent)
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); | ||
| } | ||
| else { | ||
| $('#bounty_reserved_for').css('display', 'none'); |
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.
Expected indentation of 4 spaces but found 6. (indent)
app/assets/v2/js/pages/new_bounty.js
Outdated
| $('#reservedFor').on('select2:select', function(e) { | ||
| var data = e.params.data; | ||
| reservedFor = { | ||
| username:data.text, |
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.
Missing space before value for key 'username'. (key-spacing)
app/assets/v2/js/pages/new_bounty.js
Outdated
| username:data.text, | ||
| creation_date: new Date(), | ||
| email: data.email, | ||
| avatar_url:'' |
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.
Missing space before value for key 'avatar_url'. (key-spacing)
… first 24 hours, after that it will be open to everyone else
| e.preventDefault(); | ||
| if ($(this).attr('href') == '/interested') { | ||
| show_interest_modal.call(this); | ||
| if(currentLoggedInUser.length > 0 && reservedForUsername.length > 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.
Expected space(s) after "if". (keyword-spacing)
Missing space before opening brace. (space-before-blocks)
| if ($(this).attr('href') == '/interested') { | ||
| show_interest_modal.call(this); | ||
| if(currentLoggedInUser.length > 0 && reservedForUsername.length > 0){ | ||
| if(currentLoggedInUser === reservedForUsername){ |
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.
Expected space(s) after "if". (keyword-spacing)
Missing space before opening brace. (space-before-blocks)
| if(currentLoggedInUser.length > 0 && reservedForUsername.length > 0){ | ||
| if(currentLoggedInUser === reservedForUsername){ | ||
| show_interest_modal.call(this); | ||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| if(currentLoggedInUser === reservedForUsername){ | ||
| show_interest_modal.call(this); | ||
| } | ||
| else{ |
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.
Expected space(s) after "else". (keyword-spacing)
| var reservedForHoursLeft = 24 - Math.abs(new Date() - new Date(reservedForCreationDate)) / 36e5; | ||
| var errorMsg = ''; | ||
|
|
||
| if(Math.round(reservedForHoursLeft) > 1){ |
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.
Expected space(s) after "if". (keyword-spacing)
Missing space before opening brace. (space-before-blocks)
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+reservedForUsername+'</a>'; | ||
| // show a static image for now becase the search is not returning an image | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; | ||
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); |
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.
Infix operators must be spaced. (space-infix-ops)
Trailing spaces not allowed. (no-trailing-spaces)
| // show a static image for now becase the search is not returning an image | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; | ||
| $('#bounty_reserved_for').html(reservedForHtmlLink+reservedForAvatar); | ||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| $('#bounty_reserved_for_label').css('display', 'none'); | ||
| } | ||
|
|
||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| // listen to reserved for changes | ||
| $('#reservedFor').on('select2:select', function(e) { | ||
|
|
||
| var data = e.params.data; |
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.
Expected blank line after variable declarations. (newline-after-var)
…n created by the funder
| e.preventDefault(); | ||
| if ($(this).attr('href') == '/interested') { | ||
| show_interest_modal.call(this); | ||
| if( currentLoggedInUser.length > 0 && reservedForUsername.length > 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.
Expected space(s) after "if". (keyword-spacing)
There should be no spaces inside this paren. (space-in-parens)
| if( currentLoggedInUser.length > 0 && reservedForUsername.length > 0) { | ||
| if (currentLoggedInUser === reservedForUsername) { | ||
| show_interest_modal.call(this); | ||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| var errorMsg = ''; | ||
|
|
||
| if (Math.round(reservedForHoursLeft) > 1) { | ||
| errorMsg = 'This issue is currently reserved for ' + reservedForUsername + ', please try to [Start Work] again after the next ' + Math.round(reservedForHoursLeft) +' hours' |
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.
Infix operators must be spaced. (space-infix-ops)
Missing semicolon. (semi)
| var reservedForHoursLeft = 24 - Math.abs(new Date() - new Date(reservedForCreationDate)) / 36e5; | ||
|
|
||
| // check if 24 hours have passed before setting the issue as reserved | ||
| if (Math.round(reservedForHoursLeft) > 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.
Missing space before opening brace. (space-before-blocks)
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">'+reservedForUsername+'</a>'; | ||
| // show a static image for now becase the search is not returning an image | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; |
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.
Expected blank line after variable declarations. (newline-after-var)
| if (currentLoggedInUser.length > 0 && reservedForUsername.length > 0) { | ||
| if (currentLoggedInUser === reservedForUsername) { | ||
| show_interest_modal.call(this); | ||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| var errorMsg = ''; | ||
|
|
||
| if (Math.round(reservedForHoursLeft) > 1) { | ||
| errorMsg = 'This issue is currently reserved for ' + reservedForUsername + ', please try to [Start Work] again after the next ' + Math.round(reservedForHoursLeft) +' hours'; |
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.
Infix operators must be spaced. (space-infix-ops)
|
|
||
| // check if 24 hours have passed before setting the issue as reserved | ||
| if (Math.round(reservedForHoursLeft) > 0) { | ||
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; |
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.
Infix operators must be spaced. (space-infix-ops)
| // check if 24 hours have passed before setting the issue as reserved | ||
| if (Math.round(reservedForHoursLeft) > 0) { | ||
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">' + reservedForUsername + '</a>'; |
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.
Infix operators must be spaced. (space-infix-ops)
| var profile_link = 'https://gitcoin.co/profile/'+reservedForUsername; | ||
| var reservedForHtmlLink = '<a href="'+profile_link+'">' + reservedForUsername + '</a>'; | ||
| // show a static image for now becase the search is not returning an image | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${ static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; |
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.
Expected blank line after variable declarations. (newline-after-var)
| // show a static image for now becase the search is not returning an image | ||
| var reservedForAvatar = `<img class="rounded-circle" src="${ static_url + 'v2/images/user-placeholder.png'}" width="25" height="25"/>`; | ||
| $('#bounty_reserved_for').html(reservedForHtmlLink + reservedForAvatar); | ||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| else { | ||
| $('#bounty_reserved_for').css('display', 'none'); | ||
| $('#bounty_reserved_for_label').css('display', 'none'); | ||
| } |
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.
Trailing spaces not allowed. (no-trailing-spaces)
| $('#bounty_reserved_for').css('display', 'none'); | ||
| $('#bounty_reserved_for_label').css('display', 'none'); | ||
| } | ||
| } |
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.
Closing curly brace does not appear on the same line as the subsequent block. (brace-style)
| } else { | ||
| $('#bounty_reserved_for').css('display', 'none'); | ||
| $('#bounty_reserved_for_label').css('display', 'none'); | ||
| } |
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.
Trailing spaces not allowed. (no-trailing-spaces)
app/dashboard/helpers.py
Outdated
| body1 = '<p>Hi ' + bounty_reserved_for['username'] + ',<br><br>' | ||
| body2 = 'An issue has been assigned to you on gitcoin. Please start working on it in the next 24 hours,' | ||
| body3 = ' otherwise it will be opened up for other bounty hunters as well.<br><br>Regards</p>' | ||
| send_mail('founders@gitcoin.co', bounty_reserved_for['email'], 'Reserved Issue', str(body1 + body2 + body3), html=True) |
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.
E501 line too long (131 > 120 characters)
app/dashboard/helpers.py
Outdated
| body2 = 'An issue has been assigned to you on gitcoin. Please start working on it in the next 24 hours,' | ||
| body3 = ' otherwise it will be opened up for other bounty hunters as well.<br><br>Regards</p>' | ||
| send_mail('founders@gitcoin.co', bounty_reserved_for['email'], 'Reserved Issue', str(body1 + body2 + body3), html=True) | ||
|
|
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.
W293 blank line contains whitespace
app/dashboard/views.py
Outdated
| raise Http404 | ||
|
|
||
| keys = ['experience_level', 'project_length', 'bounty_type', 'permission_type', 'project_type'] | ||
| keys = ['experience_level', 'project_length', 'bounty_type', 'permission_type', 'project_type', |
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.
W291 trailing whitespace
app/dashboard/helpers.py
Outdated
| body2 = 'An issue has been assigned to you on gitcoin.' | ||
| body3 = ' Please start working on it in the next 24 hours,' | ||
| body4 = ' otherwise it will be opened up for other bounty hunters as well.<br><br>Regards</p>' | ||
| send_mail('founders@gitcoin.co', bounty_reserved_for['email'], 'Reserved Issue', str(body1 + body2 + body3 + body4), html=True) |
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.
E501 line too long (139 > 120 characters)
app/dashboard/helpers.py
Outdated
| body3 = ' Please start working on it in the next 24 hours,' | ||
| body4 = ' otherwise it will be opened up for other bounty hunters as well.<br><br>Regards</p>' | ||
| send_mail('founders@gitcoin.co', bounty_reserved_for['email'], 'Reserved Issue', str(body1 + body2 + body3 + body4), html=True) | ||
|
|
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.
W293 blank line contains whitespace
app/dashboard/helpers.py
Outdated
| body3 = ' Please start working on it in the next 24 hours,' | ||
| body4 = ' otherwise it will be opened up for other bounty hunters as well' | ||
| body5 = '.<br><br>Regards</p>' | ||
| send_mail('founders@gitcoin.co', bounty_reserved_for['email'], 'Reserved Issue', str(body1 + body2 + body3 + body4 + body5), html=True) |
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.
E501 line too long (147 > 120 characters)
app/dashboard/helpers.py
Outdated
| body4 = ' otherwise it will be opened up for other bounty hunters as well' | ||
| body5 = '.<br><br>Regards</p>' | ||
| send_mail('founders@gitcoin.co', bounty_reserved_for['email'], 'Reserved Issue', str(body1 + body2 + body3 + body4 + body5), html=True) | ||
|
|
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.
W293 blank line contains whitespace
app/dashboard/helpers.py
Outdated
| body3 = ' Please start working on it in the next 24 hours,' | ||
| body4 = ' otherwise it will be opened up for other bounty hunters as well' | ||
| body5 = '.<br><br>Regards</p>' | ||
|
|
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.
W293 blank line contains whitespace
app/dashboard/helpers.py
Outdated
| body4 = ' otherwise it will be opened up for other bounty hunters as well' | ||
| body5 = '.<br><br>Regards</p>' | ||
|
|
||
| send_mail('founders@gitcoin.co', |
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.
W291 trailing whitespace
app/dashboard/helpers.py
Outdated
| body5 = '.<br><br>Regards</p>' | ||
|
|
||
| send_mail('founders@gitcoin.co', | ||
| bounty_reserved_for['email'], |
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.
W291 trailing whitespace
app/dashboard/helpers.py
Outdated
|
|
||
| send_mail('founders@gitcoin.co', | ||
| bounty_reserved_for['email'], | ||
| 'Reserved Issue', |
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.
W291 trailing whitespace
app/dashboard/helpers.py
Outdated
| send_mail('founders@gitcoin.co', | ||
| bounty_reserved_for['email'], | ||
| 'Reserved Issue', | ||
| str(body1 + body2 + body3 + body4 + body5), |
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.
W291 trailing whitespace
| show_interest_modal.call(this); | ||
| const reservedForHoursLeft = 24 - Math.abs(new Date() - new Date(reservedForCreationDate)) / 36e5; | ||
|
|
||
| if ((currentLoggedInUser.length > 0 && reservedForUsername.length > 0) && reservedForHoursLeft > 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.
Multiple spaces found before 'reservedForHoursLeft'. (no-multi-spaces)
|
@thelostone-mc |
|
@PixelantDesign I think @thelostone-mc was thinking bounties that are contests / cooperative by definition can't be reserved for one person. I think that makes sense -- it should only be for traditional bounties. |
|
@thelostone-mc here is a link to a video showing the UI changes https://vimeo.com/289170255 . I have implemented the changes requested and so I hope its shows everything clearly. I've also pushed some bug fixes as requested so kindly check on them as well 😃 thanks. |
|
Looks pretty good....is there a reason for the large amount of space between Reserved for and the name of the user? |
|
@PixelantDesign not really, let me reduce the space |
|
@PixelantDesign it now looks like this, hope this is ok |
|
looks good thanks! Ho about the rest? Looks like Permissions is far away from Approval Required. Could you check all resolutions? Any reason the placements changed? |
|
@PixelantDesign sorry for that, the above fix had some issues but i've pushed the correct one |
|
@thelostone-mc @PixelantDesign any more changes to be made in this PR? thanks 🙂 |
| padding: 1em 0; | ||
| } | ||
|
|
||
| #bounty-info-row{ |
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.
space before {
| width: 100%; | ||
| } | ||
|
|
||
| .bounty-info-row-span-left{ |
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.
space before {
| float: left; | ||
| } | ||
|
|
||
| .bounty-info-row-span-right{ |
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.
space before {
| font-weight: bold; | ||
| } | ||
|
|
||
| #bounty_reserved_for a{ |
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.
space before {
| transform: none; | ||
| } | ||
|
|
||
| #bounty_reserved_for img{ |
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.
space before {
|
@mul1sh @thelostone-mc My only other comment: can we automatically put this issue in 'Work Started' and list the 'Reserved' individual as under 'Work Started'? This will avoid confusion on the Issue Explorer as the issue won't show up as 'Open'. Outside of the scope for this ticket (it wasn't listed in #2037), but perhaps in a v2 we can send an e-mail / inbox notification to the Gitcoiner in question to have them confirm they are willing to work the bounty. For v1, I think we can assume that the Reserve bounty will be used in cases they know that a particular individual will do the work. |
|
@thelostone-mc thanks for the feedback, sorting it now Edit |
|
@vs77bb sure, i'll re-implement it this way |
|
@mul1sh is there a reason this was closed? |
|
@PixelantDesign apologies for closing this, but I explained why here and I also re-opened the PR here which is basically a duplicate of this PR. |
|
ok! thanks! |

Description
This PR allows funders to reserve bounties for particular users for 24 hours.
Funder Form
[x] On the funder form under Permissions Field add the following: Reserved for _.
[x] User should be able to type in a username in the input field
Issue Details
[x] The Issue Details should display that this issue is Reserved for X Contributor with the contributor's icon, linking to their profile.
[x] Only the contributor(s) that have been selected to work this issue can click start work.
[x] Group information and line the information up like this (Will Tip Extra)
Email
[x] User(s) should be notified that an issue has been reserved for them to work on.
Checklist
Affected core subsystem(s)
Web
Testing
Yes I have tested this PR, and it will not break anything when merged into master 🙂
Refers/Fixes
Fixes #2037