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

Add new age filter in QB #5272

Draft
wants to merge 2 commits into
base: production
Choose a base branch
from
Draft

Add new age filter in QB #5272

wants to merge 2 commits into from

Conversation

CarolineDenis
Copy link
Contributor

Fixes #5180

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

TODO

@CarolineDenis CarolineDenis added this to the 7.9.9 milestone Sep 12, 2024
@acwhite211
Copy link
Member

acwhite211 commented Sep 18, 2024

Here is the QB request body to the http://localhost/stored_query/ephemeral/ api that I used to test the back-end age filtering operation:

{
  "name": "New Query",
  "contextname": "CollectionObject",
  "contexttableid": 1,
  "selectdistinct": false,
  "countonly": false,
  "formatauditrecids": false,
  "specifyuser": "/api/specify/specifyuser/1/",
  "isfavorite": true,
  "ordinal": 32767,
  "fields": [
    {
      "tablelist": "1",
      "stringid": "1.collectionobject.age",
      "fieldname": "age",
      "isrelfld": false,
      "sorttype": 0,
      "position": 2,
      "isdisplay": true,
      "operstart": 16,
      "startvalue": "10,100",
      "isnot": false
    },
    {
      "tablelist": "1",
      "stringid": "1.collectionobject.catalogNumber",
      "fieldname": "catalogNumber",
      "isrelfld": false,
      "sorttype": 0,
      "position": 0,
      "isdisplay": true,
      "operstart": 8,
      "startvalue": "",
      "isnot": false
    }
  ],
  "_tablename": "SpQuery",
  "remarks": null,
  "searchsynonymy": null,
  "smushed": null,
  "sqlstr": null,
  "timestampcreated": "2024-08-05",
  "timestampmodified": null,
  "version": 1,
  "createdbyagent": null,
  "modifiedbyagent": null,
  "offset": 0,
  "limit": 40
}

TODO: Decide what we want to return in the age column. Right now the operation does does the filtering.
TODO: Also decide on if we want to add a virtual field attribute in the datamodel, or if we will just catch specific exceptions like age in the code.

id: 15,
label: resourcesText.name(),
description: undefined,
renderPickList: true,
Copy link
Contributor Author

@CarolineDenis CarolineDenis Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pick list that pulls data from GeologicTimePeriod. We can already do that as a user > schema config > choose field i.e text1 in CO table > create pick list > type entries table > size limit (-1) in the code or 500 in UI > save
Need to do this in the system.

If we query on the example text1 CO we have a pick list

In the pick list table there is a field isSystem we need that to be true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋Back Log
Development

Successfully merging this pull request may close these issues.

Add Extended Age Query (EAQ) functionality
2 participants