зеркало из https://github.com/mozilla/treeherder.git
Bug 1577532 - Reflect new job classified status after using BugFiler (#5518)
This commit is contained in:
Родитель
56bb1827ed
Коммит
48c5941a75
|
@ -476,8 +476,8 @@ export class BugFilerClass extends React.Component {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!failureStatus) {
|
if (!failureStatus) {
|
||||||
successCallback(data);
|
|
||||||
toggle();
|
toggle();
|
||||||
|
successCallback(data);
|
||||||
} else {
|
} else {
|
||||||
this.submitFailure('Treeherder Bug Filer API', failureStatus, data);
|
this.submitFailure('Treeherder Bug Filer API', failureStatus, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,9 +114,13 @@ class PinBoard extends React.Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
saveClassification = async job => {
|
saveClassification = async pinnedJob => {
|
||||||
const { recalculateUnclassifiedCounts, notify } = this.props;
|
const { recalculateUnclassifiedCounts, notify, jobMap } = this.props;
|
||||||
const classification = this.createNewClassification();
|
const classification = this.createNewClassification();
|
||||||
|
// Ensure the version of the job we have is the one that is displayed in
|
||||||
|
// the main job field. Not the "full" selected job instance only shown in
|
||||||
|
// the job details panel.
|
||||||
|
const job = jobMap[pinnedJob.id];
|
||||||
|
|
||||||
// classification can be left unset making this a no-op
|
// classification can be left unset making this a no-op
|
||||||
if (classification.failure_classification_id > 0) {
|
if (classification.failure_classification_id > 0) {
|
||||||
|
@ -131,6 +135,8 @@ class PinBoard extends React.Component {
|
||||||
// update the job to show that it's now classified
|
// update the job to show that it's now classified
|
||||||
const jobInstance = findJobInstance(job.id);
|
const jobInstance = findJobInstance(job.id);
|
||||||
|
|
||||||
|
// Filter in case we are hiding unclassified. Also causes a repaint on the job
|
||||||
|
// to show it if has been newly classified or not.
|
||||||
if (jobInstance) {
|
if (jobInstance) {
|
||||||
jobInstance.refilter();
|
jobInstance.refilter();
|
||||||
}
|
}
|
||||||
|
@ -637,6 +643,7 @@ class PinBoard extends React.Component {
|
||||||
PinBoard.propTypes = {
|
PinBoard.propTypes = {
|
||||||
recalculateUnclassifiedCounts: PropTypes.func.isRequired,
|
recalculateUnclassifiedCounts: PropTypes.func.isRequired,
|
||||||
decisionTaskMap: PropTypes.object.isRequired,
|
decisionTaskMap: PropTypes.object.isRequired,
|
||||||
|
jobMap: PropTypes.object.isRequired,
|
||||||
classificationTypes: PropTypes.array.isRequired,
|
classificationTypes: PropTypes.array.isRequired,
|
||||||
isLoggedIn: PropTypes.bool.isRequired,
|
isLoggedIn: PropTypes.bool.isRequired,
|
||||||
isPinBoardVisible: PropTypes.bool.isRequired,
|
isPinBoardVisible: PropTypes.bool.isRequired,
|
||||||
|
@ -665,7 +672,7 @@ PinBoard.defaultProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = ({
|
const mapStateToProps = ({
|
||||||
pushes: { revisionTips, decisionTaskMap },
|
pushes: { revisionTips, decisionTaskMap, jobMap },
|
||||||
pinnedJobs: {
|
pinnedJobs: {
|
||||||
isPinBoardVisible,
|
isPinBoardVisible,
|
||||||
pinnedJobs,
|
pinnedJobs,
|
||||||
|
@ -676,6 +683,7 @@ const mapStateToProps = ({
|
||||||
}) => ({
|
}) => ({
|
||||||
revisionTips,
|
revisionTips,
|
||||||
decisionTaskMap,
|
decisionTaskMap,
|
||||||
|
jobMap,
|
||||||
isPinBoardVisible,
|
isPinBoardVisible,
|
||||||
pinnedJobs,
|
pinnedJobs,
|
||||||
pinnedJobBugs,
|
pinnedJobBugs,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче