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

BibTex and ReferenceManager export - property of "unpublished" changes "item type" to "unpublished" ? #123

Closed
photomedia opened this issue Feb 17, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@photomedia
Copy link

This line sets the "type" in the BibTex export to "unpub" for any type (thesis, article, etc.) if it finds the "unpublished" value in "ispublished" field:
"

$data->{type} = "unpublished" if $dataobj->get_value( "ispublished" ) eq "unpub";

I don't think that makes sense. A thesis might be "unpublished" but it is nevertheless still a "thesis" that is available in a repository. Furthermore, this breaks the import into Zotero, as there is no "unpublished" as an Item Type there.

The same thing happens with Reference Manager export, on this line:

Both ReferenceManager and BibTex would otherwise work for Zotero export if it wasn't for this unexpected issue with "unpublished":

$data->{TY} = "UNPB" if $status eq "unpub";

Are we sure that this use of "unpublished" as an item type is correct?

@drn05r
Copy link
Contributor

drn05r commented Feb 17, 2021

I think I agree with your point. I think the best solution is changing the conditional statement that will only change the type (to unpublished or UNPB) if it has not already been changed by the fact that it is specific type. Although reading the BibTeX, this would technically be wrong. However, I guess this is where theory and the real world clash. Two things that could help:

  1. Add a note field to indictate it is unpublished whilst keeping the original type (i.e. article, thesis, etc.).
  2. Make this feature of not setting as unpublished confiigurable but enabled by default, i.e. future releases by default won't set unpublished if a specific type has already been set.

@drn05r drn05r self-assigned this Feb 18, 2021
@drn05r drn05r added the enhancement New feature or request label Feb 18, 2021
@drn05r drn05r added this to the 3.4.3 milestone Feb 18, 2021
@drn05r drn05r closed this as completed in 352ee5d Feb 18, 2021
@photomedia
Copy link
Author

Hi @drn05r! Thank you so much for making this change. I just tested this with a default 3.4.3, and I see that the "unpublished" overrides the set item type, even though the option is set. I think that contradicts the intention of NOT overriding by default?
"Make this feature of not setting as unpublished confiigurable but enabled by default, i.e. future releases by default won't set unpublished if a specific type has already been set."?

This code:
$publication_status_type_override = 1 unless EPrints::Utils::is_set( $publication_status_type_override );
So in other words, set it to override (ie., unpublished) by default, unless it is already set to 1 in config (which it is, by default).
So to get it to NOT override, I would have to set the config option to 0, right?

@drn05r
Copy link
Contributor

drn05r commented Jan 24, 2022

Yes. If there is no configuration option $c->{export}->{publication_status_type_override} then the variable $publication_status_type_override will be set to 1, (i.e. true). The only way for $publication_status_type_override to be false is if you explicitly set $c->{export}->{publication_status_type_override} = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants