service-api
service-api copied to clipboard
/api/v1/widget/shared/search?term returns the first result which contains the term instead of matching it exactly
If we use the api /api/v1/widget/shared/search?term=
to search for a widget with name "launch1 Launches Table"
it returns results which contain the word launch1 Launches Table
instead of matching the exact string
This way if there is launch1 Launches Table
and hello_launch1 Launches table
, it returns the entry which was created first, so hello_lauch1 Launches Table
is returned
e.g
url: https://<RP INSTANCE URL>/api/v1/<project_name>/widget/shared/search?term=launch1 Launches Table
r.status_code: 200
r.text: {"content":[{"description":"RP PreProc Auto widget","owner":"teflo_user","share":true,"id":360,"name":"teflo_launch1 Launches Table","widgetType":"launchesTable","contentParameters":{"contentFields":[],"itemsCount":10}}],"page":{"number":1,"size":20,"totalElements":1,"totalPages":1}}
Current version:API Service: 5.6.3
Authorization Service: 5.6.3
Service UI: 5.6.0
Could it be because it is looking for find any instead of exact string? https://github.com/reportportal/service-api/blob/baa49cae548d4f5c8daf80df3bfc97bcac7859b3/src/main/java/com/epam/ta/reportportal/core/item/impl/provider/DataProviderType.java#L45