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
crossreferenced entry citekey changed #11136
Comments
Hey, I'm looking for pickup my first issue. Could you please assign this to me? |
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at. Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. |
Hey, I'm new to this project. I've successfully setup the project in my local machine. I'm using a Manjaro Linux machine.
I tried to reproduce the issue. But couldn't notice the expected issue. Here are the entries in first library : Parent entry @Article{Carpenter2024,
author = {Keshav Carpenter},
journal = {Spring},
title = {Demo to reproduce github issue},
year = {2024},
}
Child entry @Article{Keshav,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {Carpenter2024},
} On pasted in new library : It got pasted as the original library. @Article{Keshav2024,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {Carpenter2024},
}
Hey @ilippert, please let me know if there is anything I missed while reproducing the issue. |
thanks for checking. I just used your entries and pasted these into my library. And already at this point it does not work. The reason being here maybe: Sorry, not sure whether this makes sense - happy to spend some more time, in 2 weeks, as alas, right now I cannot take 20 minutes to spell this out in more systematic ways. Thanks for your understanding. |
Alright, so one thing I got, in my case the citekey of child entry in new library changes from |
this is expected and good, imho. Because the child's citekey is generated according to the default pattern and the available information. So: ✔️
expected. I suggest you now edited your second library's defaults for the generation of citekeys. In my case, I always add the title's first word, or something like that. |
I update the default key generation pattern to [title][year] @Article{Demo2toCreateChildEntry,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {DemotoReproduceGithubIssue2024},
} So, can I assume that I've successfully reproduced the issue ? |
To confirm, if you can: maybe paste both entries in first library and both as well for the second library after pasting?
--
Sent from my LineageOS device with K-9 Mail. Please excuse my brevity.
|
I couldn't understand it clearly. What I tried is : Copied both entries form second lib and tried to paste them in first lib. But it show duplication conflict, and ask to solve it (similar to merge conflict with git).
|
I apologise.
I wanted to suggest: like in your first/earlier post, paste the entries here on the github issue interface, so we can see your versions.
Cheers
--
Sent from my LineageOS device with K-9 Mail. Please excuse my brevity.
…On 14 April 2024 13:34:08 CEST, Keshav Carpenter ***@***.***> wrote:
> To confirm, if you can: maybe paste both entries in first library
I couldn't understand it clearly. What I tried is : Copied both entries form second lib and tried to paste them in first lib. But it show duplication conflict, and ask to solve it (similar to merge conflict with git).
> and both as well for the second library after pasting
This step is not at all clear to me.
--
Reply to this email directly or view it on GitHub:
#11136 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Original lib @Article{Carpenter2024,
author = {Keshav Carpenter},
journal = {Spring},
title = {Demo to reproduce github issue},
year = {2024},
}
@Article{Keshav2024,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {Carpenter2024},
}
New lib @Article{DemotoReproduceGithubIssue2024,
author = {Keshav Carpenter},
journal = {Spring},
title = {Demo to reproduce github issue},
year = {2024},
}
@Article{Demo2toCreateChildEntry,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {DemotoReproduceGithubIssue2024},
}
Before pasting these two entries to new lib I changed the default key generation pattern for citekey to [title][year] |
I think, I've reproduced the issue. But I'm not sure how to approach from here. I tried to navigating the code by finding snippets with keywords like |
@alpha951 Maybe set a breakpoint at |
Hey @koppor,
@Article{Carpenter2020,
author = {Keshav Carpenter},
journal = {Spring},
title = {Demo to reproduce github issue},
year = {2020},
}
@Article{Keshav,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {Carpenter2020},
}
@Article{DemotoReproduceGithubIssue2020,
author = {Keshav Carpenter},
journal = {Spring},
title = {Demo to reproduce github issue},
year = {2020},
}
@Article{Demo2toCreateChildEntry2020,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {DemotoReproduceGithubIssue2020},
}
So, please help me what I'm doing wrong, or is there any other default cite key pattern I should try to reproduce the bug. |
@alpha951 Reproducer:
@Article{child,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {parent},
}
@Article{parent,
author = {Keshav Carpenter},
journal = {Spring},
title = {Demo to reproduce github issue},
year = {2020},
}
Result for the child entry: @Article{Demo2toCreateChildEntry,
author = {Child Keshav},
journal = {Linuxtalks},
title = {Demo-2 to create child entry},
crossref = {2020DemotoReproduceGithubIssue},
} crossref entry is correct, but citation key is not. |
@alpha951 The issue is probably happening if the cross-referenced entry is imported after the child entry. Therefore, you had no issue with your example: The parent came before the child in your case. |
JabRef version
Other (please describe below)
Operating system
GNU / Linux
Details on version and operating system
JabRef 5.14--2024-04-02--bb5ef81 Linux 6.7.9-200.fc39.x86_64 amd64 Java 21.0.2 JavaFX 22+30
Checked with the latest development build (copy version output from About dialog)
Steps to reproduce the behaviour
I find that the cite key of the child entry in the new library is generated without taking into account the parent entry('s date/year information) that is also copied.
This needs to be fixed, I guess, for #6404 to make sense.
The text was updated successfully, but these errors were encountered: