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

Inventory List / Map: UBIDs not displaying #4606

Open
RDmitchell opened this issue Apr 2, 2024 · 2 comments
Open

Inventory List / Map: UBIDs not displaying #4606

RDmitchell opened this issue Apr 2, 2024 · 2 comments

Comments

@RDmitchell
Copy link

RDmitchell commented Apr 2, 2024

instance: dev1
SHA: 77b9e4a

When importing data with valid UBIDs, the UBIDs are not being displayed on the Inventory List / Map view.

However, they are displaying on the Inventory Detail view

Here is an example where the UBID is valid as shown in the PNNL UBID tool
image

But it is not being displayed in the Inventory List Map view
image

But is is displaying in the Inventory Detail view for the same property
image

@RDmitchell RDmitchell changed the title Inventory Map: UBIDs not displaying Inventory List / Map: UBIDs not displaying Apr 2, 2024
@perryr16
Copy link
Contributor

perryr16 commented Apr 3, 2024

The issue appears to be related to cycle selection on the /inventory_map_controller.js

The map calls the inventory_service.get_properties function, which hits the backend /properties/filter endpoint. If no cycle is specified in the request, then the first cycle for the org is assigned.

The map controller calls the get_properties function with undefined as the cycle argument, leading to incorrect cycle data being displayed. The following is a possible solution

// /inventory_map_controller.js
-       const pagination = await fn(1, chunk, undefined, undefined).then((data) => data.pagination);
+       const pagination = await fn(1, chunk, $scope.cycle.selected)cycle, undefined).then((data) => data.pagination);

-       const page_promises = page_numbers.map((page) => fn(page, chunk, undefined, undefined).then((data) => {
+       const page_promises = page_numbers.map((page) => fn(page, chunk, $scope.cycle.selected_cycle, undefined).then((data) => {

@perryr16
Copy link
Contributor

perryr16 commented Apr 3, 2024

@RDmitchell -- I'm hoping you can test something for me. My assumption is that the map is displaying the properties from the alphabetically first cycle in the org. Can you confirm that your alphabetically first cycle does not have properties with ubids? If it doesn't could you either add a few ubids to that cycle, or change the name of a cycle with ubids to appear first alphabetically.

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

No branches or pull requests

2 participants