Skip to content
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

Suppress subject columns in CSV export if subjects are disabled #2507

Closed
benwbrum opened this issue Apr 20, 2021 · 2 comments · Fixed by #3675
Closed

Suppress subject columns in CSV export if subjects are disabled #2507

benwbrum opened this issue Apr 20, 2021 · 2 comments · Fixed by #3675
Assignees

Comments

@benwbrum
Copy link
Owner

benwbrum commented Apr 20, 2021

Currently the Field/Table CSV export (for works and collections) assumes that it is being used on document based projects instead of field-based ones. To support wiki-links within the markdown tables, we expand the csv export into a test column for the verbatim links, and a subject column for the canonical subject headers.

Unfortunately, 97% of projects using this export are field-based projects, which do not support subject indexing. For these projects, we should only provide a single column per field/column in the export, containing the text. The column header should just be the field/column label, instead of suffixing (text) onto it.

We could key off the collection settings (subjects_enabled? field_based?), but it's probably easier to test if a transcription_field exists and suppress the subject column if it does.

See relevant code:

@symmetrically
Copy link
Contributor

@benwbrum
What I understood from the description is that I have to add a check which will check if Collection.transcription_fields.present? than instead of @headings << "#{raw_heading} (text)" we need to change it to @headings << "#{raw_heading}" right?
Do let me know is there anything am I missing ?

@benwbrum
Copy link
Owner Author

benwbrum commented Jun 7, 2023

That sounds exactly right.

@benwbrum benwbrum linked a pull request Jun 9, 2023 that will close this issue
@symmetrically symmetrically self-assigned this Jun 15, 2023
benwbrum added a commit that referenced this issue Jun 20, 2023
…in-csv

#2507-Added Check To Update The CSV Heading Column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants