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

Issue 592: Import tool: detailed subjects #593

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

veggiematts
Copy link
Contributor

Background: issue #592 : Currently, only general subjects can be imported with the import tool. It would be nice to be able to import detailed subjects as well.

This patch allows to define detailed subjets columns for the import tool.

  • Because detailed subjects cannot be attached to a resource without a general subject, detailed subjects are not created: only existing detailed subjects are processed.

  • If the given detailed subject belongs to one or more general subjects, all
    the general subject/detailed subject couples are attached to the resource.

Expected behavior/test plan:

  • Import with an existing general subject: the resource is created with the general subject
  • Import with an existing detailed subject: the resource is created with the general/detailed subjects couples
  • Import with a non existing detailed subject: the resource is created, the detailed subject is not created
  • Import with a non existing general subject: the resource is created with the general subject

This patch allows to define detailed subjets columns for the import tool.

 - Detailed subjects are not created: only existing detailed subjects are processed.

 - If the given detailed subject belongs to one or more general subjects, all
   the general subject/detailed subject couples are attached to the resource.

Expected behavior/test plan:

 - Import with an existing general subject: the resource is created with the general subject
 - Import with an existing detailed subject: the resource is created with the general/detailed subjects couples
 - Import with a non existing detailed subject: the resource is created, the detailed subject is not created
 - Import with a non existing general subject: the resource is created with the general subject
@veggiematts veggiematts added the enhancement This is an enhancement (not a bug) label Aug 13, 2019
@poacherone
Copy link
Collaborator

Tested, and was unable to import any detailed subjects. Using an existing detailed subject (where the subject is one only one word, i.e. no black space) gives no warning but does not create any detailed subject on the imported record.

Trying to add a detailed subject not existing or one with several words (like my first test subject: "Detailed test") gives a warning:
There was a problem with the database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

A proper warning to the end-user should preferably be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement (not a bug)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants