Skip to content
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

fix(common): ensure requests are translated to the latest version during import and search actions #3931

Merged
merged 3 commits into from Mar 25, 2024

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Mar 22, 2024

Description

This PR ensures requests are validated against the HoppRESTRequest versioned entity and translated to the latest version before consuming preventing any exceptions under the following scenarios.

  • Importing a collection with requests conforming to an old schema followed by an attempt to open one among them via spotlight.
  • Searching for a request in the collection tree with the above state (one or more requests not as per the latest schema) and selecting the request from the search results.

Fixes HFE-461.

Checks

  • My pull request adheres to the code style of this project
  • All the tests have passed

@jamesgeorge007 jamesgeorge007 force-pushed the hotfix/versioned-entities branch 2 times, most recently from bdde8f2 to e563494 Compare March 23, 2024 07:33
@jamesgeorge007 jamesgeorge007 changed the title fix(common): ensure requests are translated to the latest version before consumption fix(common): ensure requests are translated to the latest version while importing/searching via spotlight Mar 25, 2024
@jamesgeorge007 jamesgeorge007 changed the title fix(common): ensure requests are translated to the latest version while importing/searching via spotlight fix(common): ensure requests are translated to the latest version while importing/searching Mar 25, 2024
@jamesgeorge007 jamesgeorge007 changed the title fix(common): ensure requests are translated to the latest version while importing/searching fix(common): ensure requests are translated to the latest version during import and search actions Mar 25, 2024
Copy link
Contributor

@amk-dev amk-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add the changes to TeamSearch.service.ts also. we use queries like getSingleRequest, getCollectionChildRequests there.

@jamesgeorge007
Copy link
Member Author

Need to add the changes to TeamSearch.service.ts also. we use queries like getSingleRequest, getCollectionChildRequests there.

Wrt the getSingleRequest function, convertToTeamTree below accounts for upgrading the requests.
Similarly, for getChildRequests function, there's an invocation of converToTeamTree happening below.

@jamesgeorge007 jamesgeorge007 merged commit 0a71783 into release/2024.3.0 Mar 25, 2024
1 check passed
@jamesgeorge007 jamesgeorge007 deleted the hotfix/versioned-entities branch March 25, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants