Skip to content

Commit

Permalink
Merge pull request #1230 from oliver-sanders/5366
Browse files Browse the repository at this point in the history
store: fix ancestor order
  • Loading branch information
datamel authored Feb 20, 2023
2 parents 330bea5 + 9c2b813 commit 538c73e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ cycle point and family in tree & table views.

### Fixes

[#1230](https://github.com/cylc/cylc-ui/pull/1230) -
Fixes an issue where tasks were missing from the GUI in workflows which
use multi-level family inheritance.

[#1182](https://github.com/cylc/cylc-ui/pull/1182) - Fixes bug in filtering
by task name.

Expand Down
4 changes: 2 additions & 2 deletions src/services/mock/json/App.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
{"id": "~user/one//20000102T0000Z/succeeded"}
],
"ancestors": [
{"name": "root"},
{"name": "GOOD"}
{"name": "GOOD"},
{"name": "root"}
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/store/workflows.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function getFamilyTree (tokens, node) {
}

// add family levels below the cycle point
for (const ancestor of node.ancestors || []) {
for (const ancestor of node.ancestors.slice().reverse() || []) {
ret.push([
'family',
ancestor.name,
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/store/workflows.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ describe('cylc tree', () => {
id: '~u/w//1/PENGUIN',
name: 'PENGUIN',
ancestors: [
{ name: 'root' },
{ name: 'ANIMAL' }
{ name: 'ANIMAL' },
{ name: 'root' }
],
__typename: 'FamilyProxy'
}
Expand Down Expand Up @@ -661,6 +661,7 @@ describe('cylc tree', () => {
'workflows/UPDATE',
{
id: '~u/w//1/root',
ancestors: [],
__typename: 'FamilyProxy'
}
)
Expand Down

0 comments on commit 538c73e

Please sign in to comment.