Skip to content

When creating an entry based on a PDF, the file path should be relative #11173

@koppor

Description

@koppor

When an entry is created using a PDF (by drag'n'drop on the main table - either at the free space or between two lines), the path of the linked PDF is stored as absolute path, but not relative. This needs to be fixed.

Implementation hint: There is functionality inside JabRef to make a path relative. It "just" needs to be found and wired correctly into that drop handling

Pre condition

Setting that files are stored relative to library file location.

image

Details

b

Example PDF: IST2015.pdf

Created BibTeX:

@TechReport{Steinmachera2014,
  author   = {Igor Steinmachera and b and Marco Aurelio Graciotto Silvaa and Marco Aurelio Gerosab and David F. Redmilesc},
  title    = {A systematic literature review on the barriers faced by newcomers to open source software projects},
  year     = {2014},
  number   = {on},
  file     = {:C\:/Users/olive/OneDrive/Präsentationen/TUG 2023/JabRef/TUG 2023/demo/IST2015.pdf:PDF},
  keywords = {Open Source Software, Software Engineering, Newcomers, Beginners, Novices, Joining, Contribution, Barriers to Entry, Onboarding, Open Collaboration, Socialization, Systematic Literature Review},
}

See that the content of file has an absolute path. That should be relative.

Follow-up issue

The newly created entry is not added to the currently selected group. When working on this, please also try to fix this.

Other places where drag'n'drop works correctly

  • Dropping a file onto a line in the main table (leads to attachment instead of creation)
  • Dropping a file into the "file" field in the entry editor (leads to attachment instead of creation)
  • Dropping a file into the entry preview (leads to attachment instead of creation)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Done
Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions