MozReview: trigger a jquery JS event when an issue status changes (
bug 1253552) r?davidwalsh
In order to update the commits table when an issue's status is changed, we need
to trigger an event that we can listen for.
MozReview-Commit-ID: 47vpnZl8DTD
--- a/reviewboard/reviewboard/static/rb/js/views/reviewBoxView.js
+++ b/reviewboard/reviewboard/static/rb/js/views/reviewBoxView.js
@@ -218,16 +218,20 @@ RB.ReviewBoxView = RB.CollapsableBoxView
_onIssueStatusChanged: function(issueStatus) {
if (issueStatus === RB.BaseComment.STATE_OPEN) {
this._openIssueCount++;
} else {
this._openIssueCount--;
}
this._updateLabels();
+
+ // MozReview: trigger a jquery js event so we can update
+ // the commits table when an issue status changes.
+ $(document).trigger('mr:issue_status_changed', this);
},
/*
* Updates the Ship It and Fix It labels based on the open issue counts.
*
* If there are open issues, there will be a "Fix it!" label.
*
* If there's a Ship It, there will be a "Ship it!" label.