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

Search Documents #24

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions doc/commands/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,18 @@ pyPolarionCli --user my_username --password my_password --server my_server searc
```

Try the search command by executing the [batch file](/examples/search/search.bat).

## FAQ

### Working with Documents

The JSON output of the queries does not include much information on the documents in which the Work items are found. There are a couple of ways to use the queries and existing data to achieve your goals:

1. `location` field: This field provides an URI to the location in which the Work Item is found. If you know the structure and names of the spaces and their documents, you can extract the information from this string.
- Get the location: `--field location`

2. `document.title`: It is possible to make queries for the key `document.title`, eventhough it does not belong to the Work Items. For example:
- Work items without a document: `-q "NOT HAS_VALUE:document.title"`
- Work items in a specific document : `-q "document.title:DOCUMENT_TITLE"`

The underlying library for Polarion in Python provides more possibilities for [working with documents](https://python-polarion.readthedocs.io/en/latest/document.html), and these can be implemented in pyPolarionCli if the feature is requested in an [Issue](https://github.com/NewTec-GmbH/pyPolarionCli/issues).