Skip to content

Fix for document/module listing#4

Open
krzysztofkrak wants to merge 2 commits intopeakflames:mainfrom
krzysztofkrak:main
Open

Fix for document/module listing#4
krzysztofkrak wants to merge 2 commits intopeakflames:mainfrom
krzysztofkrak:main

Conversation

@krzysztofkrak
Copy link
Copy Markdown

Summary

Fixes GetModulesThinAsync and GetModulesInSpaceThinAsync so document listing works reliably in environments where the previous module query returned incomplete or no usable results.

Changes

  • switch module-to-project join to doc.FK_PROJECT = proj.C_PK
  • escape SQL literal inputs used in filters
  • request moduleName and use it as fallback when id is missing
  • handle null/empty results and nullable fields safely

Impact

  • fixes document listing by space
  • fixes general document listing with filters
  • no public API changes

@schaveyt
Copy link
Copy Markdown
Collaborator

What "problem" is actually being solved. I'm need to better understand what use case was being attempted that necessitated the requested change

@krzysztofkrak
Copy link
Copy Markdown
Author

Hi @schaveyt ,
In my Polarion instance, the library could read a document when its location was already known, but it could not reliably enumerate documents/modules first.

Concretely:

  • GetModuleByLocationAsync(...) worked
  • GetModulesThinAsync(...) and GetModulesInSpaceThinAsync(...) did not return usable listing results for spaces that definitely contained documents

That breaks discovery scenarios such as:

  • listing documents in a project
  • listing documents in a space
  • filtering documents by title before opening one

After this change, those listing scenarios started working in the same environment.

So this PR is not introducing a new feature. It fixes document/module enumeration for deployments where the previous query and mapping assumptions were too strict.

@schaveyt
Copy link
Copy Markdown
Collaborator

Will evaluate

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.

2 participants