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

publication_date token pulls from field_edtf_date_created field #1996

Open
kspurgin opened this issue Dec 6, 2021 · 1 comment
Open

publication_date token pulls from field_edtf_date_created field #1996

kspurgin opened this issue Dec 6, 2021 · 1 comment
Labels
Repository:Controlled Access Terms Issues pertaining to the repository: https://github.com/Islandora/controlled_access_terms

Comments

@kspurgin
Copy link
Contributor

kspurgin commented Dec 6, 2021

islandora_defaults defines a field_edtf_date_created and a field_edtf_date_issued.

The publication_date token created by controlled_access_terms is populated from field_edtf_date_created.

A couple of concerns about this:

  • In metadata-land, creation and issuance (or publication) are two very different things. (A new edition of Hamlet will probably be published next year, but that's not when the play was created.) A publication_date token would be expected to reflect the value of the field_edtf_date_issued

  • Is the assumption that controlled_access_terms will only be used when islandora_defaults is also being used? (Seems problematic, given that controlled_access_terms defines useful field types.) If not, what are the implications if my content type has defined field_creation_date and field_publication_date instead of the machine names defined in islandora_defaults?

Related (closed) issue: #1171 - On this ticket @seth-shaw-unlv brought up the dependency on islandora_defaults-specific machine names as potentially problematic, and I did not see if/where that got resolved (though I admit to not reading absolutely everything in all the PRs that were related to this).

Tagging @wgilling and @kayakr, as they were active in implementing these tokens.

@kspurgin kspurgin added the Repository:Controlled Access Terms Issues pertaining to the repository: https://github.com/Islandora/controlled_access_terms label Dec 6, 2021
@seth-shaw-unlv
Copy link
Contributor

I haven't played with tokens much, so I don't know how much help I'll be, but my 2¢:

Yes, we should de-couple controlled_access_terms from islandora_defaults. It appears that the token definition and the switch cases could be made configurable instead of being hard-coded. I'm fine with having the default config based on islandora_defaults, as long as we are able to change the config and can gracefully catch errors when a site doesn't have the default fields.

Also, it should probably be "Controlled Access Terms Tokens" rather than "Islandora Tokens" based on the module that contains it. It would make sense to keep it in this module, rather than moving it, in part because the actual code bits appear to be typed-relation and EDTF specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repository:Controlled Access Terms Issues pertaining to the repository: https://github.com/Islandora/controlled_access_terms
Projects
Development

No branches or pull requests

2 participants