alkem-io / server

Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
http://alkem.io
European Union Public License 1.2
24 stars 4 forks source link

BUG: Member organizations are not returned when filtered hub #2608

Closed Comoque1 closed 1 year ago

Comoque1 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dev.alkem.io/graphql
  2. Perform the following query:

    
    query search($searchData: SearchInput!) {
    search(searchData: $searchData) {
    
    contributorResults {
      id
      score
      terms
      type
      ... on SearchResultUser {
        ...SearchResultUser
        __typename
      }
      ... on SearchResultOrganization {
        ...SearchResultOrganization
        __typename
      }
      __typename
    }
    contributorResultsCount
    
    }
    }

fragment VisualUri on Visual { id uri name __typename }

fragment SearchResultUser on SearchResultUser { user { id nameID profile { ...SearchResultProfile typename } typename } __typename }

fragment SearchResultProfile on Profile { id displayName location { id country city typename } tagsets { id tags typename } visuals { ...VisualUri typename } typename }

fragment SearchResultOrganization on SearchResultOrganization { organization { id nameID profile { ...SearchResultProfile typename } typename } __typename }

{ "searchData": { "terms": [ "world", "admin" ], "tagsetNames": [ "skills", "keywords" ], "typesFilter": [ "hub", "opportunity", "challenge", "card", "user", "organization" ], "searchInHubFilter": "un-sdgs" } }


3. The result returns users, but not organizations that are members of the hub
![image.png](https://images.zenhubusercontent.com/5f5ff9fd50a1a94a1f25f32c/2db21469-0081-4bf8-81a3-a267ebf47adf)

**Expected behavior**
When Organization is member of a hub and search with filtered hub is applied, the memberOrganizations must be returned.
Not sure for Host Organizations and organizations members/leads of  child challenge opportunities???
Comoque1 commented 1 year ago

Tested OK on ACC env. image.png