Skip to content

Conversation

@nkutub
Copy link
Contributor

@nkutub nkutub commented Oct 23, 2025

Changes

add the close! and reopen! to the case model

Context

the close! and the reopen! methods are needed for instances where we need to raise exceptions on save!. This is useful when wrapping this call in a transactions.

Testing

referenced the updated gem in the oscar app and validated that functionality.

@nkutub nkutub requested review from a team as code owners October 23, 2025 04:36
@nkutub nkutub requested review from baonguyenNava and removed request for a team October 23, 2025 04:37
Copy link
Collaborator

@lorenyu lorenyu left a comment

Choose a reason for hiding this comment

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

Looks good, Could we add some tests?

@@ -1,7 +0,0 @@
# frozen_string_literal: true

class RenameFlexTasksToStrataTasks < ActiveRecord::Migration[8.0]
Copy link
Contributor

Choose a reason for hiding this comment

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

The best way to remove this migration is to run make db-rollback with this file still here but line 5 commented out. That will update the schema file, then you can remove this file and commit it and the schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh I didn't think of the schema file , I will role it back first

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually that does nothing other than update the version on the schema file and no other changes. the current scheam file and its version are valid this migration is superfluous so there is not reason to roll back.

@nkutub nkutub merged commit 14c4b6c into main Oct 23, 2025
2 checks passed
@nkutub nkutub deleted the add-close-and-reopen-bang branch October 23, 2025 18: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.

3 participants