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

Security is added to watchlist of other (not active) open file when new security is added/created #3452

Closed
OnkelDok opened this issue Jul 19, 2023 · 1 comment
Labels

Comments

@OnkelDok
Copy link
Member

Describe the bug

Reported here: https://forum.portfolio-performance.info/t/interferenz-zwischen-zwei-gleichzeitig-geoffneten-dateien/24516

To Reproduce

Steps to reproduce the behaviour:

  1. Have two opened files A and B, where B contains a watchlist.
  2. Select watchlist in B and switch back to file A.
  3. Create new security via main menu or +-Button
  4. Security is added to file A (as expected)
  5. But also in watchlist of file B the security was inserted (not expected)

Expected behavior

Only new security in file A.

Desktop (please complete the following information):

  • OS: Windows
  • Version 0.64.4 (Juli 2023)
@OnkelDok OnkelDok added the bug label Jul 19, 2023
buchen added a commit that referenced this issue Jul 22, 2023
The problem was that the posted event lacked information about the
client context in which the security was created. As a result, all open
watchlists were erroneously adding the security to themselves.

This change addresses the issue by creating an event that includes the
client context. Additionally, the change is using the already existing
event code for editing an existing security.

Issue: #3452 #3453
Co-authored-by: OnkelDok <90478568+OnkelDok@users.noreply.github.com>
Co-authored-by: Andreas Buchen <andreas.buchen@gmail.com>
@buchen
Copy link
Member

buchen commented Jul 22, 2023

fixed

@buchen buchen closed this as completed Jul 22, 2023
OnkelDok added a commit to OnkelDok/portfolio that referenced this issue Jul 22, 2023
buchen pushed a commit that referenced this issue Jul 23, 2023
Issue: #3452 #3459
Signed-off-by: OnkelDok <90478568+OnkelDok@users.noreply.github.com>
[keep security if transactions exist; rebased to master]
Signed-off-by: Andreas Buchen <andreas.buchen@gmail.com>
christen90 pushed a commit to christen90/portfolio that referenced this issue Aug 2, 2023
The problem was that the posted event lacked information about the
client context in which the security was created. As a result, all open
watchlists were erroneously adding the security to themselves.

This change addresses the issue by creating an event that includes the
client context. Additionally, the change is using the already existing
event code for editing an existing security.

Issue: portfolio-performance#3452 portfolio-performance#3453
Co-authored-by: OnkelDok <90478568+OnkelDok@users.noreply.github.com>
Co-authored-by: Andreas Buchen <andreas.buchen@gmail.com>
christen90 pushed a commit to christen90/portfolio that referenced this issue Aug 2, 2023
Issue: portfolio-performance#3452 portfolio-performance#3459
Signed-off-by: OnkelDok <90478568+OnkelDok@users.noreply.github.com>
[keep security if transactions exist; rebased to master]
Signed-off-by: Andreas Buchen <andreas.buchen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants