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

Export of Preferences: User generated Export filter are duplicated #10176

Closed
2 tasks
teertinker opened this issue Aug 15, 2023 · 12 comments · Fixed by #10241
Closed
2 tasks

Export of Preferences: User generated Export filter are duplicated #10176

teertinker opened this issue Aug 15, 2023 · 12 comments · Fixed by #10241
Assignees
Labels
FirstTimeCodeContribution Triggers GitHub Greeter Workflow preferences

Comments

@teertinker
Copy link
Contributor

teertinker commented Aug 15, 2023

JabRef version

5.9 (latest release)

Operating system

Windows

Details on version and operating system

Win 10

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Have manually added export filters
  2. Export Jabref Preferences
  3. They get duplicated after export.
20230722_170708.mp4

Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr
Copy link
Member

Siedlerchr commented Aug 15, 2023

Can still reproduce this in the latest dev-

@papatekken
Copy link
Contributor

Hi I am new to open-source contribution, and looking for some good-first-issues.

May I try on this one? Thanks

@ThiloteE
Copy link
Member

I am not sure if this is a good first issue. You can try to solve it, but if you feel like this is too hard for you or you are stuck, you probably should choose from our projects page "good first issues" instead: https://github.com/orgs/JabRef/projects/5

@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Aug 27, 2023
@github-actions
Copy link
Contributor

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.

@papatekken
Copy link
Contributor

Sure thanks, I noticed that not only "Custom Export Formats", but "External file types" is also repeated.

@Siedlerchr
Copy link
Member

@calixtus Any idea what this might be?

@ThiloteE ThiloteE moved this from Normal priority to High priority in Prioritization Aug 27, 2023
@ThiloteE ThiloteE moved this from High priority to Normal priority in Prioritization Aug 27, 2023
@papatekken
Copy link
Contributor

I just check the code, after preferences export, function PreferenceDialogViewModel.setValues() was called, which duplicated the items of the TableView. I think the setValues() shouldn't be called because no value changes in preferences. But I will investigate the code more deeply later.

@calixtus
Copy link
Member

setValues should initialize/reset the Viewmodel when opening the app or to ensure that the right values are used. Simply clearing the representing list before inserting the values in setValues should fix that problem.

@papatekken
Copy link
Contributor

yes but for preferences export function it wont impact the Viewmodel, so I suggest not to call setValues for that.
Please correct me if my understanding is incorrect.

@papatekken
Copy link
Contributor

for import preferences and reset preferences, same problem happened too. For these 2 cases I will follow @calixtus suggestion and clear the list before inserting the values again.

@calixtus
Copy link
Member

setValues is called to ensure that the viewmodel is in sync with the backing preferencesService. So even it is not needed to call after export prefs, it should always work as expected! So please always call the clear function for the lists in the setValues method.

@papatekken
Copy link
Contributor

Ok no problem will change nothing but just clear the list before refresh the values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FirstTimeCodeContribution Triggers GitHub Greeter Workflow preferences
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants