Skip to content

Conversation

@mul1sh
Copy link

@mul1sh mul1sh commented Sep 5, 2018

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
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
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

mulili added 2 commits September 5, 2018 20:02
- 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
last_sync: new Date()
};

var reservedFor = "";

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)

});

// listen to reserved for changes
$('#reservedFor').on('select2:select', function (e) {

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;

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)

experienceLevel: data.experience_level,
projectLength: data.project_length,
bountyType: data.bounty_type,
reservedFor:reservedFor,

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)

projectLength: data.project_length,
bountyType: data.bounty_type,
reservedFor:reservedFor,
reservedForCreationDate:reservedFor !==""?new Date():null,

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)

'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', ''),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E231 missing whitespace after ':'

'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', ''),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E231 missing whitespace after ':'

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E231 missing whitespace after ','

@mbeacom mbeacom changed the title WIP PR [WIP] Reserve Bounties Sep 5, 2018

var build_detail_page = function(result) {
var set_reserved_for_link = function(result) {
if(result.bounty_reserved_for !== '') {

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;

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

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"/>`;

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

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 {

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');

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');
}

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)

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E231 missing whitespace after ','

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)

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

codecov bot commented Sep 5, 2018

Codecov Report

Merging #2163 into master will decrease coverage by 0.08%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
app/dashboard/router.py 28.26% <ø> (ø) ⬆️
app/dashboard/views.py 13.42% <0%> (ø) ⬆️
app/dashboard/models.py 50.19% <100%> (-0.04%) ⬇️
app/dashboard/helpers.py 17.03% <9.09%> (-0.18%) ⬇️
app/avatar/models.py 26.78% <0%> (-16.08%) ⬇️
app/avatar/admin.py 68.42% <0%> (-10.16%) ⬇️
app/dashboard/gas_views.py 23.15% <0%> (-1.59%) ⬇️
app/retail/utils.py 12.17% <0%> (ø) ⬆️
app/avatar/exceptions.py 45.45% <0%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4423c4...4346bd2. Read the comment docs.


var build_detail_page = function(result) {
var set_reserved_for_link = function(result) {
if(!$.isEmptyObject(result.bounty_reserved_for)) {

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;

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;

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

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"/>`;

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 {

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');

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)

$('#reservedFor').on('select2:select', function(e) {
var data = e.params.data;
reservedFor = {
username:data.text,

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)

username:data.text,
creation_date: new Date(),
email: data.email,
avatar_url:''

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

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

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);
}

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{

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

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

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);
}

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');
}

}

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;

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)

e.preventDefault();
if ($(this).attr('href') == '/interested') {
show_interest_modal.call(this);
if( currentLoggedInUser.length > 0 && reservedForUsername.length > 0) {

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);
}

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'

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

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"/>`;

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);
}

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

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;

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

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"/>`;

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);
}

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');
}

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');
}
}

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');
}

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)

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)

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)

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)

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

raise Http404

keys = ['experience_level', 'project_length', 'bounty_type', 'permission_type', 'project_type']
keys = ['experience_level', 'project_length', 'bounty_type', 'permission_type', 'project_type',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

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)

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)

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)

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

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)

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)

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)

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

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

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

body4 = ' otherwise it will be opened up for other bounty hunters as well'
body5 = '.<br><br>Regards</p>'

send_mail('founders@gitcoin.co',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

body5 = '.<br><br>Regards</p>'

send_mail('founders@gitcoin.co',
bounty_reserved_for['email'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace


send_mail('founders@gitcoin.co',
bounty_reserved_for['email'],
'Reserved Issue',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

send_mail('founders@gitcoin.co',
bounty_reserved_for['email'],
'Reserved Issue',
str(body1 + body2 + body3 + body4 + body5),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

@mul1sh mul1sh changed the title [WIP] Reserve Bounties Reserve Bounties Sep 6, 2018
@gitcoinbot gitcoinbot mentioned this pull request Sep 7, 2018
6 tasks
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) {

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)

@PixelantDesign
Copy link
Contributor

@thelostone-mc
What would be the reasoning to not enable for contest and cooperative? Those workers need to get paid as well, no?

@vs77bb
Copy link
Contributor

vs77bb commented Sep 10, 2018

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

@mul1sh
Copy link
Author

mul1sh commented Sep 10, 2018

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

cc @PixelantDesign @vs77bb

@PixelantDesign
Copy link
Contributor

Looks pretty good....is there a reason for the large amount of space between Reserved for and the name of the user?

@mul1sh
Copy link
Author

mul1sh commented Sep 10, 2018

@PixelantDesign not really, let me reduce the space

@mul1sh
Copy link
Author

mul1sh commented Sep 10, 2018

@PixelantDesign it now looks like this, hope this is ok

spacing_fixed

@PixelantDesign
Copy link
Contributor

PixelantDesign commented Sep 11, 2018

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?

@mul1sh
Copy link
Author

mul1sh commented Sep 11, 2018

@PixelantDesign sorry for that, the above fix had some issues but i've pushed the correct one

@mul1sh
Copy link
Author

mul1sh commented Sep 11, 2018

@thelostone-mc @PixelantDesign any more changes to be made in this PR? thanks 🙂

@thelostone-mc
Copy link
Contributor

thelostone-mc commented Sep 11, 2018

LGTM! could you

  • fix the css spacing before { (as mentioned in the comments)
  • rebase + resolve conflicts
  • squash the commits into not more than 3

cc @mbeacom / @SaptakS if in case you wanna check it out

padding: 1em 0;
}

#bounty-info-row{
Copy link
Contributor

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{
Copy link
Contributor

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{
Copy link
Contributor

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{
Copy link
Contributor

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{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space before {

@vs77bb
Copy link
Contributor

vs77bb commented Sep 11, 2018

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

@mul1sh
Copy link
Author

mul1sh commented Sep 11, 2018

@thelostone-mc thanks for the feedback, sorting it now

Edit
@thelostone-mc actually let me close this PR and make another one with the changes @vs77bb wanted, because rebasing it is proving difficult because of the many commits.

@mul1sh
Copy link
Author

mul1sh commented Sep 11, 2018

@vs77bb sure, i'll re-implement it this way

@mul1sh mul1sh closed this Sep 11, 2018
@PixelantDesign
Copy link
Contributor

@mul1sh is there a reason this was closed?

@mul1sh
Copy link
Author

mul1sh commented Oct 8, 2018

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

@PixelantDesign
Copy link
Contributor

PixelantDesign commented Oct 8, 2018

ok! thanks!

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.

6 participants