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

Specify 6 Not Showing Queries In Specify 7 #3349

Open
carlosmbe opened this issue Apr 14, 2023 · 3 comments
Open

Specify 6 Not Showing Queries In Specify 7 #3349

carlosmbe opened this issue Apr 14, 2023 · 3 comments
Labels
1 - Bug Incorrect behavior of the product 2 - Queries Issues that are related to the query builder or queries in general todo:verify Needs Verification

Comments

@carlosmbe
Copy link
Contributor

Describe the bug
Queries present in Specify 7 are not available in Specify 6

To Reproduce
Steps to reproduce the behavior:

  1. Go to NHMD Amber as petrifiedroadkill on Both Specify 6 and 7
  2. Click on Queries
  3. See error

Expected behavior
Both Versions have the same Queries

Screenshots
Screenshot 2023-04-14 at 11 25 06 AM
Screenshot 2023-04-14 at 11 25 22 AM
Screenshot 2023-04-14 at 11 25 34 AM
Screenshot 2023-04-14 at 11 29 30 AM

Desktop:
OS: Mac OSx Ventura
Browser: Chrome
Specify 7 Version: 7.8.10-prerelease

Database Name: NHMD Test

Reported By
@carlosmbe

@carlosmbe carlosmbe added 1 - Bug Incorrect behavior of the product pri:unknown labels Apr 14, 2023
@carlosmbe
Copy link
Contributor Author

Error is also present in DAO_TEST

@maxpatiiuk
Copy link
Member

Part of the diference is because sp7 list of queries includes schema mappings, where as sp6 excludes those. (would be fixed by #285 or #256)

@melton-jason
Copy link
Contributor

Another difference is that some queries contain features that are Specify 7 exclusive.
Specify 7 marks these queries as Not Favorited in the database, which hides the queries by default in Specify 6.

query.set('isFavorite', !isModern(query));

export function isModern(query: SpecifyResource<SpQuery>): boolean {
const serializedQuery = serializeResource(query);
const baseTableName = getModel(serializedQuery.contextName)?.name;
if (baseTableName === undefined) return false;
const fields = serializedQuery.fields;
const fieldSpecsMapped = queryFieldsToFieldSpecs(
baseTableName,
parseQueryFields(fields)
);
return (
containsOr(fieldSpecsMapped) ||
containsSpecifyUsername(baseTableName, fieldSpecsMapped) ||
containsRelativeDate(fieldSpecsMapped)
);
}

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Front-End Backlog Jun 13, 2023
@grantfitzsimmons grantfitzsimmons added 2 - Queries Issues that are related to the query builder or queries in general and removed Unsorted labels Jul 2, 2023
@emenslin emenslin added the todo:verify Needs Verification label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Queries Issues that are related to the query builder or queries in general todo:verify Needs Verification
Projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants