community-platform icon indicating copy to clipboard operation
community-platform copied to clipboard

[bug] updating user location updates research article

Open AlfonsoGhislieri opened this issue 2 years ago • 7 comments

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:

  1. Go to 'Research'
  2. Click on 'Username' of the creator an older research article
  3. Switch to admin mode
  4. Click edit
  5. Change location of user on the page you are viewing
  6. Save changes
  7. Go back to research page
  8. 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.

AlfonsoGhislieri avatar May 02 '23 13:05 AlfonsoGhislieri

I can work on this if no one else has started

SophXN avatar May 17 '23 14:05 SophXN

That would be great, thanks @SophXN! Let me know if you have any questions or need any help

AlfonsoGhislieri avatar May 17 '23 15:05 AlfonsoGhislieri

@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.

SophXN avatar Jun 19 '23 23:06 SophXN

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?

AlfonsoGhislieri avatar Jun 26 '23 14:06 AlfonsoGhislieri

👋🏻 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 avatar Jul 16 '23 11:07 thisislawatts

@thisislawatts absolutely that’s the implementation I was thinking… I completely forgot/didn’t realise I was even assigned to this issue..

AlfonsoGhislieri avatar Jul 16 '23 11:07 AlfonsoGhislieri

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: @.***>

SophXN avatar Jul 16 '23 13:07 SophXN

fixed with: https://github.com/ONEARMY/community-platform/pull/3646

Someone please click close on this issue.

pizzaisdavid avatar Jun 13 '24 19:06 pizzaisdavid