Open RDmitchell opened 3 months ago
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) => {
@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.
instance: dev1 SHA: 77b9e4afa
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](https://github.com/SEED-platform/seed/assets/6314950/a9d2a304-8706-4a2a-9942-d24f8d09816f)
But it is not being displayed in the Inventory List Map view![image](https://github.com/SEED-platform/seed/assets/6314950/a120c624-f696-45bb-bc42-6e56818ad91c)
But is is displaying in the Inventory Detail view for the same property![image](https://github.com/SEED-platform/seed/assets/6314950/46fe17cb-3c7a-426a-8aa1-bdd816cc020a)