-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting importers by "Last Run" brings up a DataTables alert, does not change order. #956
Comments
1 task
kirkkwang
added a commit
that referenced
this issue
Sep 16, 2024
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
kirkkwang
added a commit
that referenced
this issue
Sep 18, 2024
* 🐛 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 * 🤖 Update upload-artifact and download-artifact CI was getting errors because the versions we were previously using were deprecated. This commit updates the actions to the latest versions. * 🐛 Remove Downloadable Files sorting The downloadable files sorting was broken plus, it's not clear now a downloadable file should be sorted. * ⚙️ Add guard for new migrations This commit will add a guard to the new migrations to ensure that they do not run if the columns already exist in the database. * 🤖 Add rake task to re save importers This rake task will allow users to re save all their importers. It accounts for tenants if it is a Hyku application. ```sh bundle exec rake bulkrax:resave_importers ```
@lsat12357 We recently made a fix with this PR just FYI. It's working on our end but if you have the means would you be able to test it out? You would need to update and run migrations. |
@kirkkwang apologies, did not catch the notification on this. I just tried it and yes the importer index is working for me too, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the importers index page, clicking on "Last Run" brings up a DataTables alert box with the following message:
DataTables warning: table id=importers-table - Ajax error. For more information about this error, please see http://datatables.net/tn/7
In the console, there is an ActiveRecord error:
ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column "last_imported_at" does not exist
...
SELECT "bulkrax_importers".* FROM "bulkrax_importers" ORDER BY last_imported_at asc
The text was updated successfully, but these errors were encountered: