Ability to filter with comparison parameters (smaller/larger than)

Created on 7 February 2013, almost 12 years ago
Updated 29 April 2024, 9 months ago

Currently there is no way to query entities based on comparison attributes. Attempts to query such as

http://server/<entityname>?price>2000

do not work in my tests.

The same could be used for dates:

http://server/<entityname>?changed>64000

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇷Brazil rodmaz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Assigned to aangel
  • 🇺🇸United States aangel
  • 🇺🇸United States aangel

    I've done some manual testing, added some tests that handle the three types of date fields (I think what I did should work without the Date module being required) and added other filtering tests.

  • Status changed to Needs work 9 months ago
  • 🇺🇸United States drumm NY, US

    This project has switched to GitLab CI, so merge requests should be used instead of patch files.

  • 🇺🇸United States froboy Chicago, IL

    @drumm it looks like @aangel did open a branch, but missed creating the MR. I've done that: https://git.drupalcode.org/project/restws/-/merge_requests/2

  • Pipeline finished with Success
    9 months ago
    Total: 168s
    #147340
  • Status changed to Needs review 9 months ago
  • 🇺🇸United States froboy Chicago, IL

    @drumm I see a bunch of phpcs errors/warnings, but I'd imagine much of that is preexisting tech debt and not from the changes in this issue. How would you recommend moving forward?

  • 🇺🇸United States aangel

    Yes, those phpcs warnings were there before and I didn't want to expand the MR with non-issue related changes. I might have fixed a very few things but not many.

  • 🇮🇳India vineshmalviya

    Updated patch to fix the issue

    When using the webservice and doing search using operators like ct or sw error was thrown and searches are not done.

    eg search using search_data.json?field_first_name[ct]=vinesh
    This will through error when search done on profile field with contain operator

    We have done changes to fix the way search is handled when contain or start with operator passed in web service search
    in restws.entity.inc

  • 🇺🇸United States froboy Chicago, IL

    @vineshmalviya it looks like you're new here, welcome! You've uploaded a patch to an issue with a MR. Please review Using GitLab to Contribute to Drupal to understand the new workflow. I'd also recommend adding some more complete test steps so that we can properly validate the problem you're seeing.

    Thanks!

    (also doing cleanup to hide patch files since this in using a MR now)

  • Pipeline finished with Failed
    8 months ago
    Total: 3842s
    #163359
  • Pipeline finished with Success
    8 months ago
    Total: 153s
    #165252
  • Pipeline finished with Failed
    8 months ago
    Total: 2291s
    #184889
  • Pipeline finished with Failed
    8 months ago
    Total: 130s
    #184947
  • Pipeline finished with Failed
    8 months ago
    Total: 156s
    #185101
  • Pipeline finished with Failed
    8 months ago
    Total: 121s
    #185152
  • Pipeline finished with Failed
    8 months ago
    Total: 128s
    #185172
  • Pipeline finished with Failed
    7 months ago
    Total: 239s
    #185849
  • Pipeline finished with Failed
    7 months ago
    Total: 162s
    #185874
  • Pipeline finished with Failed
    7 months ago
    Total: 134s
    #191362
  • Pipeline finished with Failed
    7 months ago
    Total: 212s
    #192380
Production build 0.71.5 2024