diff --git a/pom.xml b/pom.xml index 97467b6a4..190bbeb20 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ system build:production osgi.extender;filter:="(osgi.extender=org.jahia.bundles.blueprint.extender.config)" - MCwCFB6EWbfkaZ5mcDwwtlKcQLhPHoMZAhR4xPRDDxOtQDDvH9opYiQz+pQ96g== + MCwCFD/TCIKGNSSOq8Iga3EphH2K/YE0AhQQMkqhiwmB8gZTgPTeIc7Hlkwe4Q== app-shell=2.7,graphql-dxm-provider=2.19.1,jcontent=2.9 6.9 diff --git a/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.gql-queries.js b/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.gql-queries.js index b92929d7b..7d46996ab 100644 --- a/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.gql-queries.js +++ b/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.gql-queries.js @@ -1,14 +1,16 @@ import gql from 'graphql-tag'; import {PredefinedFragments} from '@jahia/data-helper'; -export const UsagesQuery = gql`query($path:String!, $language: String!, $pageSize: Int!, $currentPage: Int!) { +export const UsagesQuery = gql`query($path:String!, $language: String!, $pageSize: Int!, $currentPage: Int!, $fieldSorter: InputFieldSorterInput) { jcr { nodeByPath(path: $path) { ...NodeCacheRequiredFields - usages: references(fieldFilter: {filters: {fieldName: "node.visible", value: "true"}}, limit: $pageSize, offset: $currentPage) { + usages: usages(fieldFilter: {filters: {fieldName: "node.visible", value: "true"}}, limit: $pageSize, offset: $currentPage, fieldSorter: $fieldSorter) { nodes { - name - language + properties { + name + language + } node { ...NodeCacheRequiredFields visible: isNodeType(type: {types: ["jnt:workflowTask"], multi: NONE}) @@ -61,13 +63,12 @@ export const UsagesCountQuery = gql`query($path:String!) { jcr { nodeByPath(path: $path) { ...NodeCacheRequiredFields - usages: references(fieldFilter: {filters: {fieldName: "node.visible", value: "true"}}) { + usages: usages(fieldFilter: {filters: {fieldName: "node.visible", value: "true"}}) { nodes { node { ...NodeCacheRequiredFields visible: isNodeType(type: {types: ["jnt:workflowTask"], multi: NONE}) } - } pageInfo { nodesCount diff --git a/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.jsx b/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.jsx index 92dcf21e9..e1b9fd28a 100644 --- a/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.jsx +++ b/src/javascript/editorTabs/AdvancedOptions/Usages/Usages.jsx @@ -35,7 +35,7 @@ export const Usages = () => { ...acc, [ref.node.uuid]: { ...ref.node, - locales: acc[ref.node.uuid] ? [...acc[ref.node.uuid]?.locales, ref.language] : [ref.language] + locales: ref.properties.map(property => property.language) } } ), {})) : [];