Research export for tags and related data
Closed this issue · 2 comments
User story/persona
As a community manager, I want to be able to explore how tags are being used by volunteers and which tags are being applied to which assets.
Is your feature request related to a problem? Please describe.
Currently Concordia has extremely limited insight into tags. The Django admin does not include any view into the relationship between tags and assets. Tagging is an experimental feature, but volunteers are investing time and energy into tagging assets. We need to be able to evaluate how volunteers are using tags and evaluate how/if to move this feature forward in a minimal way. Additionally, we have had volunteer requests to use tags.
The simplest way for Community Managers to access/explore the connection between tags and assets might be to add assets as a field in the campaign CSV export. Tags could be its own column in the export where all tags for an asset are concatenated together, separated by a semicolon or other marker.
Alternately a tags CSV export could be created in which each tag action could be exported along with the asset tagged, user, date, and other information. Filtering would likely be desired to narrow what is exported
Acceptance Criteria
Research the possibility and evaluate the difficulty of exporting tag data, as a field in the campaign CSV export. If challenging, explore other options such as a tags export.
Acceptance Test:
- Explore and evaluate the possibility of adding tags as a field in the campaign CSV export
- Could there be an export that combines - https://crowd.loc.gov/admin/concordia/userassettagcollection/ and https://crowd.loc.gov/admin/concordia/tag/
- Explain the steps needed as a comment on this ticket
- If overly complex, determine alternative ways to show or export asset/tag data for CM use and also document in this ticket.
- Create a new ticket for the proposed solution.
GOAL: Have a usable export by end of Q2 (ends March) so that CMs can begin evaluating by Q3
Can be a initial export by script to start and then evaluate making it a admin feature.
- Yes - distinct tag values for an asset can be added to the Campaign csv export. It's a matter of figuring out the right queryset (working on that now) and how to append them as a list to right of the latest transcription
- Yes - a separate export of userassettagcollection and tag values can be created - currently a manage command on admin tag makes the most sense
- Issue #1598 provided the intital export of the data for CM analysis. To export the asset tag data again ahead of any feature implemented within the application have a developer run sql against the database. Here's a query that would do that. You could also modify it to narrow the result to a specific campaign, etc.
select t.value, uatc.created_on, uatc.user_id, a.id as asset_pk, a.title as asset_title, a.download_url, a.resource_url, c.slug as campaign_slug
from concordia_asset as a
INNER JOIN concordia_userassettagcollection as uatc on (uatc.asset_id = a.id)
INNER JOIN concordia_userassettagcollection_tags as uat on (uat.userassettagcollection_id = uatc.id)
INNER JOIN concordia_tag as t on (t.id = uat.tag_id)
INNER JOIN concordia_item as i on (i.id = a.item_id)
INNER JOIN concordia_project as p on (p.id = i.project_id)
INNER JOIN concordia_campaign as c on (c.id = p.campaign_id)
order by a.id
I'll create the new ticket in Jira.