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

Folder Path Search: Finalised param being ignored #408

Open
NigelPalmer opened this issue Mar 31, 2023 · 0 comments
Open

Folder Path Search: Finalised param being ignored #408

NigelPalmer opened this issue Mar 31, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@NigelPalmer
Copy link
Contributor

Description

The api end point http://localhost:8080/api/folders/path/{path}?finalised=true has a bug where it does not pass the finalised param on to other functions that require it. This can result in an unfinalised data model being returned.

Steps to reproduce

e.g.

  1. Open Mdm UI and login as an admin
  2. Make sure that you have a finalised dataModel and an open dataModel .
  3. Open a new tab in the same browser and go to http://localhost:8080/api/folders/path/{path}?finalised=true (e.g: http://localhost:8080/api/folders/path/fo:OUH%20Data%20Warehouse%7Cdm:modules?finalised=true )
  4. Check the response. This will return the open dataModel instead of the finalised one: ...,"finalised":false,...
  5. See error

Expected behavior

When calling http://localhost:8080/api/folders/path/{path}?finalised=true a finalised dataModel should be returned.

Additional context

The fix is to simply pass the finalised param into the next function, then everything works as expected.

Update file: mdm-core/grails-app/services/uk/ac/ox/softeng/maurodatamapper/core/path/PathService.groovy
Change line 149 to be: findResourceByPathFromRootResource(rootResource, path, null, pathParams)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Merged to Develop / Waiting to release
Development

No branches or pull requests

1 participant