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

feat: notify funder to extend expiration date before taking action #4161

Merged
merged 1 commit into from
Apr 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,33 +123,38 @@ var callbacks = {
'"><img class=avatar src="/dynamic/avatar/' + username + '"></a>' ];
},
'status': function(key, val, result) {
var ui_status = val;
let ui_status = val;

if (ui_status == 'open') {
if (ui_status === 'open') {
ui_status = '<span>' + gettext('OPEN ISSUE') + '</span>';

let soft = result['can_submit_after_expiration_date'];
let can_submit = result['can_submit_after_expiration_date'];

if (soft && is_bounty_expired(result)) {
ui_status += '<p class="text-highlight-light-blue" style="text-transform: none;">' +
if (!isBountyOwner && can_submit && is_bounty_expired(result)) {
ui_status += '<p class="text-highlight-light-blue font-weight-light font-body" style="text-transform: none;">' +
gettext('This issue is past its expiration date, but it is still active.') +
'<br>' +
gettext('Check with the submitter to see if they still want to see it fulfilled.') +
'</p>';
}
}
if (ui_status == 'started') {
} else if (ui_status === 'started') {
ui_status = '<span>' + gettext('work started') + '</span>';
}
if (ui_status == 'submitted') {
} else if (ui_status === 'submitted') {
ui_status = '<span>' + gettext('work submitted') + '</span>';
}
if (ui_status == 'done') {
} else if (ui_status === 'done') {
ui_status = '<span>' + gettext('done') + '</span>';
}
if (ui_status == 'cancelled') {
} else if (ui_status === 'cancelled') {
ui_status = '<span style="color: #f9006c;">' + gettext('cancelled') + '</span>';
}

if (isBountyOwner && is_bounty_expired(result) &&
ui_status !== 'done' && ui_status !== 'cancelled') {

ui_status += '<p class="font-weight-light font-body" style="color: black; text-transform: none;">' +
'This issue has expired. Click <a class="text-highlight-light-blue font-weight-semibold" href="/extend-deadlines">here to extend expiration</a> ' +
'before taking any bounty actions. </p>';
}

return [ 'status', ui_status ];
},
'issue_description': function(key, val, result) {
Expand Down