Skip to content

Conversation

andrea-williams
Copy link
Contributor

@andrea-williams andrea-williams commented Sep 17, 2025

Ticket #3584

Recommended Testing Steps

  1. sign in with your own Business BCeID, or use bc-cas-dev-secondary. Create a new operator for this user. Then log out
  2. sign in with your IDIR. Delete the existing pending transfer for "Bangles SFO" (operator Bravo Technologies). Create a new transfer for "Bangles SFO" to transfer to the operator created in Step 1, with date of transfer effective immediately. Log out.
  3. sign in with the bc-cas-dev Business BCeID (operator is Bravo Technologies). Confirm that "Bangles SFO" operation no longer appears in your Administration dashboard, but it should still appear in your Reporting dashboard and you should still be able to view the report that was submitted for it. Log out.
  4. sign in again with the BCeID used in Step 1. Confirm that "Bangles SFO" operation now appears in your Administration dashboard. Then go to Reporting dashboard and confirm that the operation appears there too, but that you don't have the option to view the report submitted for it by Bravo. Click the "Start" button to try to create a new report for Bangles SFO - you should see a modal popup with an error message saying that a report already exists for that operation and reporting year. does not appear.

Brianna updates:

@andrea-williams andrea-williams self-assigned this Sep 18, 2025
@pbastia pbastia force-pushed the develop branch 2 times, most recently from 834bc9d to f40780b Compare September 22, 2025 17:04
@andrea-williams andrea-williams force-pushed the feat/reports-stay-after-transfer/3584 branch from a05a54b to d23e6a5 Compare September 23, 2025 23:06
report_version__report__reporting_year=reporting_year,
).values("operation_name")[:1]

current_operations = OperationDataAccessService.get_all_current_operations_for_user(user)
Copy link
Contributor

Choose a reason for hiding this comment

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

b this is more complicated than needed?

Comment on lines 36 to 46
user = baker.make(User, app_role=AppRole.objects.get(role_name="industry_user"))
operator = operator_baker()
user_operator = user_operator_baker(
{
"user": user,
"operator": operator,
"status": UserOperator.Statuses.APPROVED,
"role": UserOperator.Roles.ADMIN,
}
)
mock_get_by_guid.return_value = user_operator.user
Copy link
Contributor

Choose a reason for hiding this comment

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

replace with recipes

operation_baker(_quantity=20)

# create report for operation, filed by original_operator
report_r1v1_id = ReportService.create_report(operation.id, reporting_year_2024.reporting_year)
Copy link
Contributor

@BCerki BCerki Sep 29, 2025

Choose a reason for hiding this comment

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

better to use bakers

Copy link
Contributor

Choose a reason for hiding this comment

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

I still think it's better to use bakers, but I'm going to leave as-is because it does work and setting up the bakers manually requires a good understanding of reporting

timeline1.end_date = "2025-07-01T00:00:00Z"
timeline1.save()
OperationDesignatedOperatorTimeline.objects.create(
operation=operation, operator=new_user_operator.operator, start_date="2025-07-01T00:00:00Z", end_date=None
Copy link
Contributor

Choose a reason for hiding this comment

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

use dates at end of year

.only("id", "name", "submission_date", "status", "operator__legal_name", "bc_obps_regulated_operation__id")
)

@classmethod
Copy link
Contributor

Choose a reason for hiding this comment

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

we already have get_previously_owned_operations_by_operator, overlap?

if (response?.error)
setResponseError(
`We couldn't create a report for operation ID '${operationId}' and reporting year '${reportingYear}': ${response?.error}.`,
if (response?.error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this was an unrelated bug?

Copy link
Contributor

Choose a reason for hiding this comment

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

asked PR

Copy link
Contributor

@BCerki BCerki left a comment

Choose a reason for hiding this comment

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

Comments are notes to self

@BCerki BCerki force-pushed the feat/reports-stay-after-transfer/3584 branch 5 times, most recently from c204948 to 4b0cafa Compare October 2, 2025 22:46
…revious owner-operator can now view their reports but new owner-operator can see previous owners' reports too - they shouldnt be able to
…rect operator, but new operator still sees duplicated operations and can't create a new report
…ate report for operation that already has one from old operator
…s_for_operator. Need to investigate failing tests
… more still failing due to changed code; new pytests still needed
@BCerki BCerki force-pushed the feat/reports-stay-after-transfer/3584 branch from 4b0cafa to de75d53 Compare October 2, 2025 22:48
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.

2 participants