Skip to content

Blank screen displayed on clicking the Technology tags in the Challenge listings and Details pages #4967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sandhiyakavi opened this issue Sep 21, 2020 · 22 comments

Comments

@sandhiyakavi
Copy link
Collaborator

Description:
Blank screen displayed on clicking the Technology tags in the Challenge listings page

steps to Reproduce:

  1. Go to Challenge listings page.
  2. Click a technology tag displayed below a challenge listed.

Expected Result:
Challenges should be filtered (according the particular technology) and listed.

Screenshot:

Filter_by_technology tag

Video:
Filter_by_technology.zip

@sandhiyakavi
Copy link
Collaborator Author

@LieutenantRoger : Filtering the challenges according to the keyword (Technology) is not working.

image

video:

Keyword_filter_Fails.zip

@sandhiyakavi sandhiyakavi added QA Fail QA verification on Dev has failed. Assignee to redo the fix. and removed Ready for QA labels Sep 22, 2020
@SathyaJayabal
Copy link
Collaborator

@LieutenantRoger , when I search by keywords I see more number of challenges
Screenshot 2020-09-22 at 10 27 10 AM
Screenshot 2020-09-22 at 10 27 38 AM

@LieutenantRoger
Copy link
Collaborator

LieutenantRoger commented Sep 22, 2020

@SathyaJayabal Are you sure the staging is deploying my code ? Please see the staging when I have Other as the filter, it looked like this: https://take.ms/vJaTs

And in my local, before filter:

https://take.ms/h1l3Z

After filter

https://take.ms/b4W6b

I can see the number has reduced with the filter applied. Please double check on this, thanks.

@LieutenantRoger LieutenantRoger added the Need clarification Need clarification to proceed fixing the issue further label Sep 22, 2020
@LieutenantRoger
Copy link
Collaborator

@SathyaJayabal Please double check based on the snapshots I provided above.

@LieutenantRoger
Copy link
Collaborator

@sushilshinde

@LieutenantRoger
Copy link
Collaborator

@LieutenantRoger : Filtering the challenges according to the keyword (Technology) is not working.

image

video:

Keyword_filter_Fails.zip

The keyword under dev environment is working as expected.
I couldn't find TypeScript keyword under dev environment, please better provide the API request sent as well

Have you tried otherwise keywords ? This is very possibly due to the API issue.

@LieutenantRoger
Copy link
Collaborator

@luizrrodrigues needs to add API Issues label in this case.

@ThomasKranitsas
Copy link
Contributor

With Auth:
Screenshot 2020-09-24 at 5 38 26 PM
Without Auth:
Screenshot 2020-09-24 at 5 38 11 PM

Seems to be working fine. Please provide the cURL you're using if you still think it's an API issue.

@Oanh-and-only-Oanh Oanh-and-only-Oanh removed the QA Fail QA verification on Dev has failed. Assignee to redo the fix. label Sep 24, 2020
@Oanh-and-only-Oanh
Copy link

@sushilshinde @luizrrodrigues, is this still an API issue?

@rootelement
Copy link
Contributor

Testing on this environment, every tag I clicked on works fine.
https://test-community-app.topcoder-dev.com/challenges

@rootelement
Copy link
Contributor

This is the only issue I'm seeing now. If I search for OnDemand in the filters, i get zero results displayed, 4 in the buckets section, but one returned in the inspector for this query:
https://api.topcoder-dev.com/v5/challenges/?status=Active&isLightweight=true&perPage=1&tags[]=HPE%20Haven%20OnDemand&tracks[]=Dev&tracks[]=Des&tracks[]=DS&tracks[]=QA

Screen Shot 2020-09-28 at 2 42 34 PM

@SathyaJayabal
Copy link
Collaborator

@rootelement , it is not working in staging.
Please check here the current deployment statuses
https://community-app-dev-dashboard.herokuapp.com/#/dashboard

See screenshots for example.
Screenshot 2020-09-29 at 11 59 54 AM

Screenshot 2020-09-29 at 11 58 19 AM

@rootelement
Copy link
Contributor

@ThomasKranitsas I don't understand what's going on here... The query with tags looks like this:

if (criteria.tags) {
    if (criteria.includeAllTags) {
      for (const tag of criteria.tags) {
        boolQuery.push({ match_phrase: { tags: tag } })
      }
    } else {
      for (const tag of criteria.tags) {
        shouldQuery.push({ match: { tags: tag } })
      }
    }
  }

Should that second shouldQuery be match_phrase as well?

If I query from postman with my jwt in prod, i get:
https://api.topcoder.com/v5/challenges/?status=Active&tags[]=3D%20Reconstruction&isLightweight=true&tracks[]=Des&tracks[]=Dev&tracks[]=QA&tracks[]=DS
Screen Shot 2020-09-29 at 11 12 56 AM

If I query the same with a jwt from a non-privileged user in prod (jcori_arena), i get 91 items, and they're coming back without the tag in the tags array (example ID: 26416dcb-17f0-45be-9ad0-0517b6f0c743)
Screen Shot 2020-09-29 at 11 15 29 AM

Screen Shot 2020-09-29 at 11 16 16 AM

@rootelement
Copy link
Contributor

@ThomasKranitsas this is the built ES query from the server logs.
A couple things I noticed.

  1. I tried to use the includeAllTags flag to see if match_phrase would fix it. I see includeAllTags included in the built ES query.
  2. Even if I remove it and run this against prod, i get 0 results. I'm not sure if it's the way the tags are searched for or if it's the task debacle at the top that's causing issues.
{
    "query": {
        "bool": {
            "must": [
                {
                    "bool": {
                        "should": [
                            {
                                "bool": {
                                    "must_not": {
                                        "exists": {
                                            "field": "task.isTask"
                                        }
                                    }
                                }
                            },
                            {
                                "match_phrase": {
                                    "task.isTask": false
                                }
                            },
                            {
                                "bool": {
                                    "must": [
                                        {
                                            "match_phrase": {
                                                "task.isTask": true
                                            }
                                        },
                                        {
                                            "match_phrase": {
                                                "task.isAssigned": false
                                            }
                                        }
                                    ]
                                }
                            },
                            {
                                "match_phrase": {
                                    "task.memberId": "40061596"
                                }
                            }
                        ]
                    }
                },
                {
                    "bool": {
                        "should": [
                            {
                                "bool": {
                                    "must_not": {
                                        "exists": {
                                            "field": "groups"
                                        }
                                    }
                                }
                            }
                        ]
                    }
                },
                {
                    "bool": {
                        "filter": [
                            {
                                "match_phrase": {
                                    "status": "Active"
                                }
                            },
                            {
                                "match_phrase": {
                                    "includeAllTags": "true"
                                }
                            },
                            {
                                "bool": {
                                    "should": [
                                        {
                                            "match_phrase": {
                                                "trackId": "5fa04185-041f-49a6-bfd1-fe82533cd6c8"
                                            }
                                        },
                                        {
                                            "match_phrase": {
                                                "trackId": "9b6fc876-f4d9-4ccb-9dfd-419247628825"
                                            }
                                        },
                                        {
                                            "match_phrase": {
                                                "trackId": "36e6a8d0-7e1e-4608-a673-64279d99c115"
                                            }
                                        },
                                        {
                                            "match_phrase": {
                                                "trackId": "c0f5d461-8219-4c14-878a-c3a3f356466d"
                                            }
                                        }
                                    ]
                                }
                            },
                            {
                                "match_phrase": {
                                    "tags": "Heroku"
                                }
                            }
                        ]
                    }
                }
            ]
        }
    },
    "sort": [
        {
            "created": {
                "order": "desc",
                "missing": "_last",
                "unmapped_type": "String"
            }
        }
    ]
}

If I run this query, I get 1 result back:

{
    "query": {
        "bool": {
            "must": [
                {
                    "match_phrase": {
                        "status": "Active"
                    }
                },
                {
                    "match_phrase": {
                        "tags": "3D Reconstruction"
                    }
                }
            ]
        }
    }
}

@SathyaJayabal SathyaJayabal added P2 Important (resolve within 3 days) and removed P0 Critical (resolve within 4 hours) labels Oct 1, 2020
@SathyaJayabal
Copy link
Collaborator

reducing the priority as the blank screen issue is resolved

@rootelement
Copy link
Contributor

We're testing a fix to the search difference in dev currently. The tags issue should be fixed, but we will report back in a bit.

@rootelement
Copy link
Contributor

It seems to be working well in dev. This will be queued for release shortly. The ability to type in the search box and filter on tags is a new feature request, and has been opened on the challenge api repo as a separate topic.

@Oanh-and-only-Oanh
Copy link

@rootelement, the new feature request, is 1) the ability to type in search box and match on "Challenge title" and "tags". 2) However, we also want the ability to display list of challenges with a specific tag if a "tag" is selected from the Challenge Listings page or Details page. I believe, this is second point refers to this ticket.

@Oanh-and-only-Oanh Oanh-and-only-Oanh changed the title Blank screen displayed on clicking the Technology tags in the Challenge listings page Blank screen displayed on clicking the Technology tags in the Challenge listings and Details pages Oct 2, 2020
@rootelement
Copy link
Contributor

Yes, and that's what I said is done and working. so this ticket is solved.

@SathyaJayabal
Copy link
Collaborator

@rootelement , let us know when the tags fix is released to prod.

@sandhiyakavi
Copy link
Collaborator Author

Verified on staging.

image

challengedetail_keywordfilter.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants