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

MODFQMMGR-311 Fix instance stat codes #345

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

mweaver-ebsco
Copy link
Collaborator

Purpose

Describe the purpose of the pull request. Include background information if necessary.

Approach

How does this change fulfill the purpose?

TODOS and Open Questions

  • Use GitHub checklists. When solved, check the box and explain the answer.

Learning

Describe the research stage. Add links to blog posts, patterns, libraries or addons used to solve this problem.

Pre-Merge Checklist

If you are adding entity type(s), have you:

  • Added the JSON5 definition to the src/main/resources/entity-types directory?
  • Ensured that GETing the entity type at /entity-types/{id} works as expected?
  • Added translations for all fields, per the translation guidelines? (Check this by ensuring GET /entity-types/{id} does not have mod-fqm-manager.entityType. in the response)
  • Added views to liquibase, as applicable?
  • Added required interfaces to the module descriptor?
  • Checked that querying fields works correctly and all SQL is valid?

If you are changing/removing entity type(s), have you:

  • Added migration code for any changes?

@mweaver-ebsco mweaver-ebsco force-pushed the MODFQMMGR-311-stat-codes branch 2 times, most recently from ada6742 to ada2ed8 Compare August 2, 2024 17:11
This commit fixes several small issues with instance statistical codes
- The incorrect jsonb_array_elements() was used
- The entity type containing stat code names had no ID field. This was
  causing a NullPointerException in the ResultSetRepository when
  retrieving column values for stat codes in simple_instance
- The stat codes field was not marked as queryable (this was
  because we previously marked all array-type fields as non-queryable.
  We'll be making them queryable again as we fix them)
- The translation on the stat codes field was incorrect (it was
  "Statistical code names" which is misleading when there's a
  "Statistical code name" displayed in the Inventory app which isn't the
  same field
  - For now, we'll go with "Statistical code" in order to match the
    Inventory app (this is based on feedback from BELA, so we'll go
    ahead and violate our translation guidelines this time)
- The field was marked as visibleByDefault, which is incorrect

MODFQMMGR-311 Mark the stat code full ID column as an ID

This entity type not having any ID columns causes a NullPointerException
in the ResultSetRepository when retrieving column values for
statistical code names in simple_instance

MODFQMMGR-311 Make statistical code names queryable

bla
@mweaver-ebsco mweaver-ebsco force-pushed the MODFQMMGR-311-stat-codes branch from ada2ed8 to ada3c0f Compare August 2, 2024 17:43
@@ -491,7 +491,7 @@
"entityType.simple_item_details.permanent_location_id": "Permanent location UUID",
"entityType.simple_item_details.purchase_order_line_identifier": "Purchase order line identifier",
"entityType.simple_item_details.statistical_code_ids": "Statistical code UUIDs",
"entityType.simple_item_details.statistical_code_names": "Statistical code names",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This violates our translation guidelines, but our POs talked it over and ran it by the BELA working group, and they landed on making it singular to keep the name consistent, since it's always singular in quite a few places, and only plural in the DB field name that users never actually see

@mweaver-ebsco mweaver-ebsco force-pushed the MODFQMMGR-311-stat-codes branch from ada3c0f to adaa0e1 Compare August 2, 2024 18:08
Copy link

sonarcloud bot commented Aug 2, 2024

@mweaver-ebsco mweaver-ebsco merged commit adaa0e1 into master Aug 2, 2024
6 checks passed
@mweaver-ebsco mweaver-ebsco deleted the MODFQMMGR-311-stat-codes branch August 2, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants