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

Can we update the CSV upload rules to account for the new subcategories #477

Open
drenfr01 opened this issue Oct 3, 2017 · 12 comments
Open
Assignees

Comments

@drenfr01
Copy link
Owner

drenfr01 commented Oct 3, 2017

breaking this out to a new ticket from #472 . this is the CSV upload. @TylerSheffels, mind taking a stab at this since you built the CSV upload?

@ballek
Copy link
Collaborator

ballek commented Oct 3, 2017

essited

@ballek
Copy link
Collaborator

ballek commented Nov 16, 2017

@drenfr01 @TylerSheffels bump

@TylerSheffels
Copy link
Collaborator

It's been a while since i have messed with the csv upload. Is this just asking for the csv upload to include a column for subcategory? Is there any logic that goes along with that like verifying that the subcategories are valid or can we assume you won't upload invalid ones? Is there anything else that the csv upload currently doesn't do that it should?

@ballek
Copy link
Collaborator

ballek commented Nov 21, 2017

👋🏻 @TylerSheffels ... no need to include a new column for subcategory, just update what that the app will accept in the 'category' field. currently, if i try to submit anything but the following in that field
screen shot 2017-11-20 at 11 27 40 pm the app doesn't seem to like to recognize them. (Here are the new ones!

  • Adult Education Class, Workshop
  • Attending a Performance, Festival (4 hours max)
  • Donating clothing, goods, foods (100 Points)
  • Early Childhood Playgroup
  • Exercise program, event
  • Financial Advisor Meeting
  • Financial, Employment Workshops
  • Fitness Class
  • Health Workshop
  • In-school Meeting, Event
  • In-school Volunteer, Chaperone
  • Job Fairs
  • Lending Circles, FII Meetings
  • Political Activity: rally, advocacy, event
  • Program at Library, Museum, Education Center
  • Volunteer: Helping Others (non-family)
  • Volunteer: Organization, Event
  • Voter Engagement, Registration
  • Workshop, Info Session, Meeting)

Aside from that, I could never seem to get the privateEvent/privateWhitelist feature to work. Helpful for uploading mass amount of private events to specific people!

@TylerSheffels
Copy link
Collaborator

@ballek I think this is actually working, although not how you think. During the upload process, we assign a SuperCategory based on the category field in the .csv. We look into the EventCategories collection, and match based on EventCategories.name = csvUpload.category. I am adding a quick error message that will tell you when it can't find the category, but can you try uploading based on a category name you know exists (you can probably look in Houston to make sure its correct).

@ballek
Copy link
Collaborator

ballek commented Nov 25, 2017

@TylerSheffels
screen shot 2017-11-25 at 1 43 50 pm I'm a bit hesitant to mess with Houston since there are rules attached to each category... As long as I know what to update I'm happy to do so! Also, none of the community subcategories seem to be in there which messed up my CSV upload test
screen shot 2017-11-25 at 1 46 24 pm
(Here is the spreadsheet I used, saved as xlsx to please the github gods)
testEvent.xlsx

@TylerSheffels
Copy link
Collaborator

I don't think I was clear in my last message. There shouldn't need to be any code changes to support new categories. If those categories exist in an EventCategory.name, we will set to the event. If it can't find the event category, we will mark that row as bad and say "Can't find category". Are you still seeing this error? What happens when you try to upload that test list?

@ballek
Copy link
Collaborator

ballek commented Dec 14, 2017

@TylerSheffels I'm understanding this better, and for the categories that are on Houston, this seems to be working fine. My question: how would I go about adding these categories to Houston, what is the syntax I need to know regarding rules? Additionally, there are two collections titled "eventCategories", to which should I add?

@TylerSheffels
Copy link
Collaborator

@ballek Turns out I kind of lied here. We "reset" the event categories and set them to the list outlined here: https://github.com/drenfr01/unionCapital/blob/master/meteor/lib/collections/EventCategories.js#L38-L239

If that data structure makes sense to you, can you tell me if there is any differences from what you expect? (You should also be able to look at Houston on QA and tell me from that)

There should only be one eventCategories collection on QA now, if thats not the case let me know.

@ballek
Copy link
Collaborator

ballek commented Dec 30, 2017

Hi @TylerSheffels! Thanks for investigating into this... A few changes to note:

Education looks pretty good,
but can we remove:
{
name: 'Chaperone Field Trip/Sport Activity',
rules: ['LESS_THAN_OR_EQUAL_2_HOURS'],
},

and add
{
name: 'Program at Library, Museum, Education Center'
rules: ['LESS_THAN_OR_EQUAL_2_HOURS'],
},

Health, Finance, Community look perfect.

And maybe it's a caching issue on my end, but I'm still seeing two dang EventCategories on Houston!

@TylerSheffels
Copy link
Collaborator

@drenfr01 I have updated the categories, but the two EventCategories collections sounds funky and my guess is that it has to do with the deploy process. Am I right to say that on next deploy you want to remove both of those categories?

@ballek
Copy link
Collaborator

ballek commented Jan 3, 2018

update: prod only has one EventCategories collection!
screen shot 2018-01-03 at 11 44 10 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants