|
32 | 32 | </td> |
33 | 33 | <td v-else> |
34 | 34 | No bug associated. |
35 | | - <span |
36 | | - v-if="bucket.triage_status" |
37 | | - data-testid="triage-status-display" |
| 35 | + <span v-if="triageStatus" data-testid="triage-status-display" |
38 | 36 | >Marked triaged as: |
39 | 37 | <strong data-testid="triage-status-label"> |
40 | | - {{ bucket.triage_status_display }} |
| 38 | + {{ triageStatusDisplay }} |
41 | 39 | </strong> |
42 | | - on {{ formatDate(bucket.triaged_at) }}.</span |
| 40 | + on {{ formatDate(triagedAt) }}.</span |
43 | 41 | > |
44 | 42 | <br v-if="canEdit" /><br v-if="canEdit" /> |
45 | 43 | <div v-if="canEdit" class="btn-group"> |
46 | 44 | <assignbutton :bucket="bucket.id" :providers="providers" /> |
47 | 45 | <TriageBucketDropdown |
48 | 46 | :bucket-id="bucket.id" |
49 | | - :current-status="bucket.triage_status" |
| 47 | + :current-status="triageStatus" |
50 | 48 | :choices="bucket.triage_status_choices || []" |
51 | 49 | @update="handleTriageStatusUpdate" |
52 | 50 | /> |
@@ -309,6 +307,9 @@ export default { |
309 | 307 | reports: null, |
310 | 308 | sortKeys: [...defaultSortKeys], |
311 | 309 | totalPages: 1, |
| 310 | + triageStatus: this.bucket.triage_status, |
| 311 | + triageStatusDisplay: this.bucket.triage_status_display, |
| 312 | + triagedAt: this.bucket.triaged_at, |
312 | 313 | }; |
313 | 314 | }, |
314 | 315 | computed: { |
@@ -530,8 +531,13 @@ export default { |
530 | 531 | }, |
531 | 532 | async handleTriageStatusUpdate(newStatus) { |
532 | 533 | try { |
533 | | - const data = await updateBucketTriageStatus(this.bucket.id, newStatus); |
534 | | - window.location.href = data.url; |
| 534 | + const { bucket } = await updateBucketTriageStatus( |
| 535 | + this.bucket.id, |
| 536 | + newStatus, |
| 537 | + ); |
| 538 | + this.triageStatus = bucket.triage_status; |
| 539 | + this.triageStatusDisplay = bucket.triage_status_display; |
| 540 | + this.triagedAt = bucket.triaged_at; |
535 | 541 | } catch (err) { |
536 | 542 | swal("Oops", errorParser(err), "error"); |
537 | 543 | } |
|
0 commit comments