In a recent Koha update, the ability to archive purchase suggestions was introduced. This blog post will walk through how to do this and even how to undo an archived suggestion.
Archive a Suggestion
The ability to archive purchase suggestions was an enhancement sponsored by Bibliothèque Universitaire des Langues et Civilisations, which would create a process to archive completed purchase suggestions.
 Add the ability to archive purchase suggestions
There are several ways that this feature can come in handy:
- There is a cron that can automatically 'archive' suggestions
- A library can hide 'archived' suggestions
- A library can 'un-archive' a suggestion if necessary
Process for Libraries to Archive Purchase Suggestions
When a purchase suggestion comes in, a library may choose to update this suggestion with a specific status, such as Accepted, Checked, Rejected, Ordered. Each status will have it's own tab in the Purchase Suggestion table. If a library has no suggestions in a specific status, that tab will not show.
For example, once a suggestion has been rejected, a library may choose to 'archive' this suggestion to remove it from the Suggestion Page in Koha. When libraries have a lot of suggestions, this could help minimize the amount on the screen that is not necessary to see anymore.
In this screenshot, from the rejected tab, under the "Actions", a library can now archive a suggestion. This will remove it from this table completely.
It is important that the library change the status to archived from any status, Pending, Ordered, Checked, Rejected. If a library chooses to archive a 'pending' suggestion, this will still show on the main screen of the staff client.
Searching for Archived Suggestions
If a library would like to search for 'archived' suggestions, they can do so by using the filters on the left of the screen.
Choosing the Suggestion Information option under Filters, there is a little box to check to also include 'Archived' suggestions in the search.
An archived suggestion will still live in the last status it was before it was archived. So in the example above, the library rejected the suggestion and then archived it. When searching for archived suggestions, this will now appear under the rejected tab, and will have an archive symbol in the suggestion title.
Related Cron for Archiving
As an alternative to manually archiving older suggestions or rejected suggestions, a line to the cron can be added making these suggestions archived.
For example, if a library wanted suggestions that had been rejected (after a specific timeframe, like a week) to be archived, the cron can be added like this:
perl misc/cronjobs/archive_purchase_suggestions.pl --age-date-field=rejecteddate --age=weeks:1
Another way a library could have the cron automatically archive a suggestion if after a year it was still in the 'ordered' status, the cron could do this:
perl misc/cronjobs/archive_purchase_suggestions.pl --age-date-field=suggesteddate --age=years:1 --status=ORDERED
If you are a partner and would like to activate either of these crons, please reach out to us in our ticketing system and we would be happy to set them up for you!
More Purchase Suggestion Resources
Would you like more information on the Purchase Suggestion feature in Koha?
See these helpful blog posts:
Read more by Kelly McElligott