-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix importers sorting for last run and next run
This commit will fix the sorting error that happens when the user is on the importers index and attempts to sort by the last run or next run. We add some migrations to add fields that the datatables can use so it can sort properly. Previously, this was not working because the last_imported_at and next_import_at fields were actually methods on the importer_run object and not the importer object. We are adding a few callbacks to the importer and importer_run models to ensure that the fields are properly set when they are called from either the web or the worker. Ref: - #956
- Loading branch information
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
db/migrate/20240916182737_add_last_imported_at_to_bulkrax_importers.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddLastImportedAtToBulkraxImporters < ActiveRecord::Migration[5.1] | ||
def change | ||
add_column :bulkrax_importers, :last_imported_at, :datetime | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
db/migrate/20240916182823_add_next_import_at_to_bulkrax_importers.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddNextImportAtToBulkraxImporters < ActiveRecord::Migration[5.1] | ||
def change | ||
add_column :bulkrax_importers, :next_import_at, :datetime | ||
end | ||
end |