[bug] updating user location updates research article
Describe the bug
When you change your location on your profile page it triggers an edit of all the research articles you have created, seems to be that the countrycode is being stored in the research and the user and research are intertwined.
To Reproduce Steps to reproduce the behaviour:
- Go to 'Research'
- Click on 'Username' of the creator an older research article
- Switch to admin mode
- Click edit
- Change location of user on the page you are viewing
- Save changes
- Go back to research page
- See error that all research articles created by this user are now showing as just edited and at the top of the list
Expected behaviour Updating user location should not trigger the update of research articles, these two things should probably be decoupled.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
I can work on this if no one else has started
That would be great, thanks @SophXN! Let me know if you have any questions or need any help
@AlfonsoGhislieri My apologies for not following up, gosh time flies so fast. I did look into this however unable to solve at the moment. Maybe we can pair sometime on it this week or next weekend? Or, i'll leave my notes below and feel free to unassign me if you need someone else to take over and get this done.
Hi sorry for not getting back to you here @SophXN, I've been quite busy in the last week, and still now is not great time wise. If you could drop any of your notes I could have a look at the issue and see where to go from there!
The main issue I would assume is that the user's location is probably stored in the research document as well as the user document as well?
👋🏻 Heya @AlfonsoGhislieri, @SophXN, I am going to pick this one up if thats okay with you.
Currently my thinking is we want to go from storying the author country on the Research document and instead fetch it off of the user object.
@thisislawatts absolutely that’s the implementation I was thinking… I completely forgot/didn’t realise I was even assigned to this issue..
Thanks sorry I’ve still been with no laptop but will be back on picking up tickets this week!
On Sun, Jul 16, 2023 at 7:23 AM Alfonso @.***> wrote:
@thisislawatts https://github.com/thisislawatts absolutely that’s the implementation I was thinking… I completely forgot/didn’t realise I was even assigned to this issue..
— Reply to this email directly, view it on GitHub https://github.com/ONEARMY/community-platform/issues/2283#issuecomment-1637057653, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATDYTHOT4SV6XFKYPL7W733XQPFMHANCNFSM6AAAAAAXTCW6OQ . You are receiving this because you were mentioned.Message ID: @.***>
fixed with: https://github.com/ONEARMY/community-platform/pull/3646
Someone please click close on this issue.