znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
335 stars 82 forks source link

Bug - Limit for dynamic fields (Webservice) ignored #451

Closed eficht closed 4 months ago

eficht commented 1 year ago

Environment

Expected behaviour

The configured limit value from dynamic fields of type webservice should be a parameter for the invoker to limit the number of returned items.

Actual behaviour

The limit value is ignored and not handed over to the webservice.

How to reproduce

Steps to reproduce the behavior:

  1. check the call a dynamic field of type webservice produces in the web service log.

Additional information

Limit parameter is simply missing in e.g. Kernel/System/DynamicField/Webservice/DirectRequest.pm when firing the invoker.

my $ResultData = $RequesterObject->Run(
    WebserviceID => $WebserviceData->{ID},
    Invoker      => $Param{Invoker},
    Data         => {
        %{ $Param{Data} },
        SearchTerms => $Param{SearchTerms},
        UserID      => $Param{UserID},
    },
);

adding Limit => $Param{Limit}, to the Data hash will fix it.

I did not test it, but IMHO ResponseValues.pm needs the same mod.

Screenshots

jepf commented 9 months ago

Internal issue 656

NiklasSchmitt commented 4 months ago

This issue was fixed within commits https://github.com/znuny/Znuny/commit/7e46278678d34b45b292d05681e2626376306dd8 & https://github.com/znuny/Znuny/commit/1ee219c03a81b10e535a16a0b71983a4d2b5132d.