Skip to content

Commit

Permalink
Random exec assignment depends on taskGroup name if provided
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Feb 5, 2024
1 parent 120c3ca commit a492da7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/19878.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fix an issue where a same-named task from a different group could be selected when the user clicks Exec from a task group page where multiple allocations would be valid
```
5 changes: 4 additions & 1 deletion ui/app/controllers/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ export default class ExecController extends Controller {
if (this.allocationShortId) {
allocation = this.allocations.findBy('shortId', this.allocationShortId);
} else {
allocation = this.allocations.find((allocation) =>
let allocationPool = this.taskGroupName
? this.allocations.filterBy('taskGroupName', this.taskGroupName)
: this.allocations;
allocation = allocationPool.find((allocation) =>
allocation.states
.filterBy('isActive')
.mapBy('name')
Expand Down

0 comments on commit a492da7

Please sign in to comment.