Skip to content

Retired Artifacts

Fixes

Fixes for #747 (closed) by @shivohamangal

Description

  • An index for retired artifacts will be created.
  • Users linking to retired artifacts will be redirected appropriately.
  • Retired artifacts will not be searched.
  • A section for retired artifacts will be added to edit artifacts.

Type of PR
This PR is an improvement.

Technicalities

Tests

Before testing, you will need to update the database. Simply follow the instructions in this file to do so. queries.txt

  1. Go to http://127.0.0.1:2354/admin/artifacts/retired . Here you can view the retired artifacts index. Also visit the admin dashboard - http://127.0.0.1:2354/admin/dashboard. There is a card with a button to visit the same index page.
  2. Now to test redirect functionality, there are 2 types -
    a. Retired Artifact that has a redirect_artifact_id e.g. - http://127.0.0.1:2354/artifacts/9521 . Here you will be redirected to the single view of the new artifact with a flash message stating the reason.
    b. Retired Artifact that doesn't have redirect_artifact_id e.g. - http://127.0.0.1:2354/artifacts/119 . In this case, you will be redirected to the home page with a flash message stating the reason.
  3. Task of not searching among retired artifacts was already done. #1046 (closed)
  4. To test the edit form -
    a. Go to a non-retired artifact. e.g. - http://127.0.0.1:2354/artifacts/edit/1
    b. Go to a retired artifact. e.g. http://127.0.0.1:2354/artifacts/edit/9521
  5. Finally, to test the bulk upload, got to http://127.0.0.1:2354/admin/dashboard, click on "Bulk Add or Update" button on the "Artifacts" card, and upload a csv file like so - artifacts.csv. The file should be saved in UTF-8 without BOM.

Screenshots

Checklist:

  • My pull request has a descriptive title (not a vague title like "Update index.md").
  • My pull request targets the phoenix/develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
Edited by Shivoham Angal

Merge request reports

Loading