Giveth / GIVeconomy

The Giveth Economy is the collective of projects, donors, builders, and community members builders that build the future of giving
GNU General Public License v3.0
6 stars 0 forks source link

Write migration for changing categories and sub categories #723

Closed mohammadranjbarz closed 1 year ago

mohammadranjbarz commented 2 years ago

The community WG gave below sheet to @MoeNick https://docs.google.com/spreadsheets/d/1DAB5UHCYO4hkw_RLRtz8DLXpGduVDRMHfiW-71H0m8o/edit#gid=0

mohammadranjbarz commented 2 years ago

There are some categories that exist in DB now but they are not in this googlesheet , what should I do with them? We can mark those categories as non-active then tell frontend to not show them in the create project page, but we can't delete them because we are using them now, @MoeNick What do you say?

MoeNick commented 1 year ago

@ahmadabugosh can you map the existing cateories and subcategories with the one you suggested?

MoeNick commented 1 year ago

This is the old json which should get mapped to the new suggested one. Main and sub categories

ahmadabugosh commented 1 year ago

Hey @MoeNick @mohammadranjbarz , I added a new tab on the sheet here for mapping old categories with the new ones called Mapping old categories

A few notes on this:

1) I added category and subcategory ID's to make it easier to implement.

2) I think once this is implemented, we'll still need to go in and check them one by one (this could be maybe a week long project), just to make sure everything was assigned properly.

3) I added a catch-all category "Other". This will be for the ones that are not categorized (these of course would need to be cleaned up eventually by the community team).

4) For the Giving Block ones, I put them in the "NGO -> Registered Non-profit" category for now, but we may have to change them in the future if we want to better categorize them. 

5) For Arts & Culture, we had the subcategories combined but I separated them. For now though, maybe put all of them under Art and we can clean them up at a later stage. 

Let me know if you need any more support on this!

mohammadranjbarz commented 1 year ago

Hey @MoeNick @mohammadranjbarz , I added a new tab on the sheet here for mapping old categories with the new ones called Mapping old categories

A few notes on this:

  1. I added category and subcategory ID's to make it easier to implement.
  2. I think once this is implemented, we'll still need to go in and check them one by one (this could be maybe a week long project), just to make sure everything was assigned properly.
  3. I added a catch-all category "Other". This will be for the ones that are not categorized (these of course would need to be cleaned up eventually by the community team).
  4. For the Giving Block ones, I put them in the "NGO -> Registered Non-profit" category for now, but we may have to change them in the future if we want to better categorize them.
  5. For Arts & Culture, we had the subcategories combined but I separated them. For now though, maybe put all of them under Art and we can clean them up at a later stage.

Let me know if you need any more support on this!

Thanks @ahmadabugosh it's really organized now @MoeNick I think I can start implementing that, am I right?

mohammadranjbarz commented 1 year ago

Hey @MoeNick @mohammadranjbarz , I added a new tab on the sheet here for mapping old categories with the new ones called Mapping old categories

A few notes on this:

  1. I added category and subcategory ID's to make it easier to implement.
  2. I think once this is implemented, we'll still need to go in and check them one by one (this could be maybe a week long project), just to make sure everything was assigned properly.
  3. I added a catch-all category "Other". This will be for the ones that are not categorized (these of course would need to be cleaned up eventually by the community team).
  4. For the Giving Block ones, I put them in the "NGO -> Registered Non-profit" category for now, but we may have to change them in the future if we want to better categorize them.
  5. For Arts & Culture, we had the subcategories combined but I separated them. For now though, maybe put all of them under Art and we can clean them up at a later stage.

Let me know if you need any more support on this!

Change is another third party like Giving block so I think it would be NGO -> Registered Non-profit as well, @ahmadabugosh do you agree?

ahmadabugosh commented 1 year ago

@mohammadranjbarz yes sure I would put Change under that category NGO -> Registered Non-profit for now (and we can have the community team organize it more in the future)

MoeNick commented 1 year ago

@mohammadranjbarz if you agree I moved it back to code review, cause it needs front-end integration to be able to test properly

mohammadranjbarz commented 1 year ago

@maryjaf it's up and you can test on staging

maryjaf commented 1 year ago

@mohammadranjbarz if you agree I moved it back to code review, cause it needs front-end integration to be able to test properly

befor merge: image after:

image

It seems that the project categories are not displayed correctly @mohammadranjbarz in order to have a more reliable test, the front changes should be merged and tested together. @MohammadPCh

mohammadranjbarz commented 1 year ago

@mohammadranjbarz if you agree I moved it back to code review, cause it needs front-end integration to be able to test properly

befor merge: image after: image It seems that the project categories are not displayed correctly @mohammadranjbarz in order to have a more reliable test, the front changes should be merged and tested together. @MohammadPCh

@maryjaf I changed categories to what Ahmad said, then I made all other categories isActive:false then I didn't return non active categories in project info , so you can see them there, if you want to see them you just make those categories active in admin panel then you will see them in project page

About testing with frontend it's ok, we can wait till that time, but I think they did most of the thing in another branch so they can merge it or you test on the preview of that branch, anyway I'm ok with postponing the tests

maryjaf commented 1 year ago

@maryjaf I changed categories to what Ahmad said, then I made all other categories isActive:false then I didn't return non active categories in project info , so you can see them there, if you want to see them you just make those categories active in admin panel then you will see them in project page

Thanks @mohammadranjbarz I check it.

maryjaf commented 1 year ago

Based on the active subcategories in the admin panel The display of project subcategories in the project detail section is correct. Just one question, in the search category section, inactive categories are now displayed, is this correct? @mohammadranjbarz

mohammadranjbarz commented 1 year ago

Based on the active subcategories in the admin panel The display of project subcategories in the project detail section is correct. Just one question, in the search category section, inactive categories are now displayed, is this correct? @mohammadranjbarz

No it's not correct, let me check it, I will update you

maryjaf commented 1 year ago

Based on the active subcategories in the admin panel The display of project subcategories in the project detail section is correct. Just one question, in the search category section, inactive categories are now displayed, is this correct? @mohammadranjbarz

No it's not correct, let me check it, I will update you

image

And in this page

maryjaf commented 1 year ago

Based on the active subcategories in the admin panel The display of project subcategories in the project detail section is correct. Just one question, in the search category section, inactive categories are now displayed, is this correct? @mohammadranjbarz

No it's not correct, let me check it, I will update you

image

And in this page

Do we have an update on this? @mohammadranjbarz