bcgov / cas-registration

A web app for Registration in OBPS under the Clean Growth branch
Apache License 2.0
1 stars 1 forks source link

Operation Facilities Action Cell has incorrect query param for facilities_title #2131

Open shon-button opened 2 weeks ago

shon-button commented 2 weeks ago

Describe the Bug:

File bciers/apps/administration/app/components/operations/cells/OperationFacilitiesActionCell.tsx has incorrect facilities_title when operation Type === SFO resulting in incorrect breadcrumbs:

Image

  const query = isSfo
      ? {
          ...baseQuery,
          facilities_title: params.row.name,
        }
      : baseQuery;

Probability (how likely the bug is to happen, scored from 1-5): (For example, probability of 5 is something like "it happens to all users every time they log in." Probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")

Effect (how bad the bug is when it does happen, scored from 1-5): (For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected." Effect of 1 is "It makes some styling look a little bit weird.")

Steps to reproduce the behaviour:

Screenshots:

Additional information:

marcellmueller commented 2 weeks ago

I think this is a fixtures issue since SFO facilities get pre-populated with the Operation name as the Facility name.

However there is a possible edge case where there will be an SFO Facility imported from the swrs data. We could make a sfo_facility_name resolver for OperationOut similar to the sfo_facility_id and use that, instead of using the Operation name in OperationFacilitiesActionCell.tsx.