-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo
592 lines (340 loc) · 20.6 KB
/
todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
--------------------- :::TODO::: ----------------------------
I believe that levels right now are "overengineerimg"
I have a gut feeling that says that the "level" is an over-complicating layer...
...and that Programs and Actions is all that's really needed
...and that you can chain together actions that kick one another off as needed
without the added complexity of levels
SO
with that said, let's not implement levels, at least not until it's proven that they are needed
Let's instead get some real "programs" off the ground
A "Relationship Builder" can be the first, because it's simple enough in that it's one thing each day
Once that is working, go on to a "Happiness Builder" ... and then Meditations and then Exercises
=================================
** the below needs to happen in 3 scenarios:
1) an email check-in
2) an "i did it today" check-in on the site
3) a "let's catch up" ajax call
db
--
create new fields in the goal for
met_program_goal_date
met_program_goal_notification_text
met_program_goal_need_to_notify_user_screen
met_program_goal_need_to_notify_user_email
met_program_goal_need_to_notify_feed
met_program_goal_points
met_program_goal_badge
When someone is checking in
if the goal is part of a program
if the program is a structured program
if the goal succeeds on XX inertia
if inertia is met
new_success = true
if the goal succeeds on XX success after XX lag
if goal success over XX days >= XX success threshold
new_success = true
if the goal succeeds on the first win
if this was a win
new_success = true
if the goal succeeds on XX wins in a row
if the wins in a row is >= XX
new_success = true
if new_success
if goal.met_program_goal_date is null
goal.met_program_goal_date = dnow
goal.met_program_goal_notification_text = ""
goal.met_program_goal_need_to_notify_user_screen = true
goal.met_program_goal_need_to_notify_user_email = true
goal.met_program_goal_need_to_notify_feed = true
if points get earned on goal success
goal.met_program_goal_points = points
assign points to program
append user notification w/ points info
if badge gets earned on goal success
goal.met_program_goal_badge = badge
add badge to trophy room
append user notification w/ badge info
if there is a "next goal"
put this goal on hold
"start" the next goal
append user notification w/ new goal info
if there is not a "next goal"
place the goal on hold
append user notification w/ program track complete info
send notice to feed
display notice to user on screen
email notice to user
** in activity feed when someone joins a program track, mention the program in Activity Feed
** when soemone joins a program track, email them with the details
================================
-- re-format the goals listing on the main page to incorporate new graphics for stats and for the bw vs color habit badge
-- add in the uservoice ticket image idea in the new check-in format that says "so and so succeeded, did you?" but make an option to hide that stuff too
-- add in the UV ticket image idea of teams going after badges that another team is also competing for, and display the competition at the bottom of the main page
:::CURRENT:::
--------
GENERAL
--------
do the rest of Jeff/Garnett's recent requests:
-- make the customize arrow visible again after first creating a habit but not when coming from index.html
-- add a subtle background color to the homepage for larger screens
-- centering on the homepage
-- add the coffee desktop image stuff for those w/ larger screens, if poss.
-- get the dials back for success rates (they've been gone for a while)
-- improve the check-in emails look/feel
-- team chat
-- custom companies (uw health, psych md)
make this (already applied in prod. db) respected in the UI:
add_column :users, :premium_only_complete_privacy, :boolean
-- ask in the reminder, for exercise goals, "What time are you going to work out today?" ... and then give them an array of options to click on ... and then an hour before that time, stick in the public feed "John was planning to work out 1 hour from now... send him a reminder to do it!" (warn them in the email that this will happen) ... and then if they don't check in an hour afterward, stick something in the feed saying "John was going to work out an hour ago... ask him how the workout was!"
-----------
ESFL
-----------
deployed, but TEST IN PROD: TEST whether sending an invite to another person from a program-owned template goal also adds their new goal to that program
--Have John's photo as asking the daily question on the templated ESFL ones.
--Do not auto-create their account when they sign up for ESFL ... wait until they click the ESFL link
--Landing Page: "So, one general landing place inside HF for buyers who click the link. Then a dropdown of the Empowering Habits they saw listed in the book (Empowering only, not Destructive)" --Kevin Rogers
-----------------------------
stair climbing for UWHealth
-----------------------------
(see email from diane scherschel)
!!! -- NEXT -- !!!!
plan to do some random challenge programs, similar to "lovedare (copyright infringe)" and "a course in miracles copyright infringe", or "guitar chords" or "daily writing challenge"
or the "blue zone 100 yrs + and spry" from TED or the "power moves and pencil in mouth" from TED
You HAVE to use "Levels" to wrap goals within a structured program (levels hold tempt_badges, and achieved levels are stored in level_goal)
You already created migrations for:
goal.template_level_parent_level_id integer
level.first_template_goal_id
(and applied them on prod and dev)
-T-set up model relationships between level (parent) and goal (child)
--for a program, be able to CRUD a Level
--for a level, be able to CRUD action items (goal_templates) linked via goal.template_level_parent_level_id integer
--for a program, be able to CRUD a Level w/ some tempt_badges
--for action items w/in a level, be able to specify the order of them (using goal.template_next_template_goal_id )
--for a level, be able to set the "first goal template" using level.first_template_goal_id
...joining a program that is "structured" is just a "start now" button that is the same as a "start doing this now" button link that happens to point to the first action ... and then each time they check in, you look for matching triggers for that goal... if they have met a rule/trigger that would have them "pass", then mark the current one as "hold" and also as "program completed", and incrment their program points, but do not show it in the normal "hold" area on their screen... and start up the next goal
... if you are wanting to do daily challenges that are different, do not change it via just "message" and "trigger"... change it by "level"...that way the checkpoints will already be linked to the right questions, and it'll give you options on when to move to the next "question"
... add in the "trigger/conditions" and include them on a message using the same tech you did for adding "tags" to a program
... btw, you DO have a datepicker CSS/JS working already in your "tracker" backdate area
... re-design the check-in emails to include inertia images and btn class and optional message text
... test out the adding messages ... populate your own "sleep 7+ hours" program
... identify where physically to put these things in the emails and on the web
...assign a "coach img" to a program
...assign a "coach img" to a template goal
...fit the "coach img" into each message that goes out
PROGRAMS - INVITATIONS
For anyone enrolled in a Program, add ability for owner to post snippets for all members to read. These snippets can be set to be listed as date-sensitive (so listed newest first) or as randomized (listed in a different spot, and insertable into reminder emails)
SUCCESS: the email invites to programs are working
NEXT STEP: make it so that when someone clicks on it, it reacts the same way as it does for accepting a team invite. Below is the URL that gets put at the bottom of the "join my program" emails.
http://habitforge.com/quicksignup_v2?invitation_id=21&[email protected]&to_name=HFSupport&form_submitted=1
What does it mean to "PREVIEW a program"?
Does it mean that I am simply taken to the Program page and asked to Join (Become a Member)!
BUT: We do still need to pass through their email address and invitation id so that if they do choose to join, we still know who they are on signup and can link them back
What does it mean to "JOIN a program"?
A program_enrollment record is created
An invite, if you were invited, is marked as 'accepted'
An invitee, if you were invited, is emailed letting them know you accepted
From there, you're "in the program", to show your interest. You are a member.
You can be noticed and talked to.
(Next step would be to join a "session" or to choose a "challenge/goal" to begin)
GET THE ABOVE WORKING PROPERLY, AND THEN MOVE FORWARD. NOT UNTIL THEN.
Beginner: skyscrapers 1,2,3
Intermediate: skyscrapers 1,3,5
Advanced: skyscrapers 4,5,6
Expert: (all) skyscrapers 1,2,3,4,5,6
You are currently climbing the "Torre Agbar in Barcelona, Spain (421 stairs)".
STRUCTURE example:
Program:
stop_date = start_date + 8 weeks
Beginner
Actions/Templated Goals:
skyscraper 1 (completed once you get to 421 stairs)
skyscraper 2 (completed once you get to 586 stairs)
skyscraper 3 (completed once you get to 623 stairs)
-- db changes have all been pushed and applied to prod:
program_session (just a start/stop date record)
program_enrollment (a program_id for a user, and optionally a program_session_id)
program now has optional "duration"-related fields
-- modify the program UI so that you can take advantage of the recently-added "duration/ongoing" fields
...need to be able to delete a program if no active users of the program itself and if no action items - give option to delete the actions themselves that are associated w/ the program but only if no active users
-- modify the program UI to be able to CRUD program_sessions
-- be able to "join" a program wholesale... not being able to pick and choose actions, but joining a real "program/session" and being beholden to its rules
--once a program's stop date comes due, put the program's actions on hold
(see the schema for "triggers" for programs)
(people will want this to be realtime, so do a trigger check on checkpoint update and on quant entry, not via cron)
-- new class: badges ... a user should have badges as well as a team
--i think the structure had allowed for a goal to be reached upon a certain success rate,
but we need to also let it be reached once a tracker summation is reached for that goal
(people will want this to be realtime, so do a trigger check on quant entry, not via cron)
--also add the ability to require that everyone on that team reach a particular goal before a badge win is recorded for the team
--------------------------------------
users, friends, groups, organizations
--------------------------------------
as a user
i want to be able to build a list of friends to interact with
i want to be able to join a group
maybe that group is part of an organization or maybe it is not
if i am sending out an invitation to be part of my team,
i want to be able to choose from my list of friends
when i am part of a group
i want to be able to view all of the users in that group
user_friends
user_id
friend_id
user_enemies ### those you want to block
user_id
enemy_id
user_groups
user_id
group_id
groups
name
description
organization_id
group_admins
group_id
user_id
group_members
group_id
user_id
group_goaltemplates
group_id
goaltemplate_id
group_programs
group_id
program_id
-------------------------------------------------------------------
ROWLEY 52M
-------------------------------------------------------------------
------------
NEXT
------------
--map:(set color based on % reached threshold)
--after N days, include in the check-in and reminders that It's Time to get a Quant
--graph user-level tracker results for weight
----------------
!!! since we already have in mind a handful of "templates" for trackers, might as well reduce confusion for people and ask them to choose one of those first and hide the implementation details for now
!!! for templated weight loss, ask their current weight to auto-fill in the ranges
Quant answers:
-- ask for the number and/or the yes/no depending on their tracker linkage choices
Logic needed for 3 Cases:
--quant is not linked to checkpiont yes/no at all
--quant being answered sets checkpoint to yes
--quant value determins checkpoint being set to yes/no
We'll test out two cases at first, both of which would have a max :
--one that occasionally measures something that "is" (weight)
--one that daily measures something that you achieve daily (sleep)
THE LOGIC
In the tracker goal tab
which shows a graph
and
asks you to add a new value
which will add to the day's total if it's one that accumulates
or
which will add to the day's average if it's one that measures "what is" like weight or temperature
or
asks you to increment the last value if it's a goal that accumulates
when a new answer is entered
if tracker answer kicks checkpoint to yes
then set that day to "yes"
if tracker answer sets checkpoint to yes or no based on value
then take that day's total (if accumulation) or average (if "measuring what is") and kick checkpoint to yes or no
when you get the daily yes/no email,
and
when you get the daily reminder email,
have a link in the email asking you for a measurment
clicking that link takes you to the "tracker" goal tab
and also after you answer your yes/no, ask if they want to enter a tracker value as well
--------------
FUTURE
--------------
There will be a "program" ... a 52M program
--the program will have at least 2 "action items" to it
--half of the people will be signed up for the "exercise" component ... with a weight tracker enabled
--half of the people will be signed up for the "healthy diet" component ... with a weight tracker enabled
--the weight-traacker goal can be placed on hold but not deleted (so that calculating per-state daily is not thrown off)
--each will be asked now and then to join the others in their state who are signed up for the other component
--if they sign up for the 2nd component, the weight tracker will be disabled on any but the first component
--------------
DONE
--------------
hosting js files
--add existing js files to a spot on hf server
--let Ben Cope and Stephan know the location of those js files
let user choose their state, province, or country
--state full name
--country name
--pulldown for state / province
--pulldown for country
add a class: weight_loss_by_state
state:string
state_code:string ### abbreviated
demog_population:integer
demog_percent_adults:integer
demog_number_adults:integer
demog_percent_obesity_rate:integer
demog_number_obese_adults:integer
demog_percent_of_total_obese_adults_in_challenge:integer
challenge_weighted_goal:integer challenge_qty_hold:integer challenge_qty_active:integer challenge_lbs_starting_weight_hold:integer challenge_lbs_starting_weight_active:integer challenge_lbs_last_weight_hold:integer challenge_lbs_last_weight_active:integer challenge_lbs_lost_hold:integer challenge_lbs_lost_active:integer challenge_lbs_lost_total:integer challenge_percent_of_goal_met:integer challenge_number_rank:integer challenge_last_updated_date:date js_upcolor:string js_overcolor:string js_downcolor:string
--protect the weight_loss_by_state files
--method to drop and seed the weight_loss_by_state
--allow user to modify date and hour for a quant (in case they're answering for the day before or for earlier in the day)
(Meridian Format date/time picker): file:///home/sgj700/Downloads/metronic_v1.2.4/template_content/form_component.html#
USE THE MINIFY FORMAT
-------------------------------------------------------------------
GRAPHIC REDESIGN and NEW SIGNUP PUT ON HOLD UNTIL ROWLEY 52M is done
-------------------------------------------------------------------
-----------------
FB and Google Login
-----------------
BE ABLE TO LOG OUT OF GOOGLE OR FB !!!! (not working right now)
-- NEXT --
Deal w/ the form variables as "sessions" instead of just "params" so that those invited to join for certain goals/teams don't lose that info when re-directed
(likely doesn't work for FB, and I know it doesn't work for Google)
-- LATER ON --
ALLOW USER TO LOG OUT WHILE FB IS STILL LOGGED IN ELSEWHERE
--currently it logs them back in right away
LINK FB ACCOUNT
--if current_user and HF.fb_id = nil, show Link FB button (if/once fb_current_user, update user's HF.fb_id and HF.fb_* )
UNLINK FB ACCOUNT
--if current_user and HF.fb_id != nil, show UnLink FB button (to set HF.fb_id = nil and other HF.fb_* = nil)
-------------------- :::FUTURE::: -------------------------------
-- WEDNESDAYS ONLY: not sure if weekly_report_of_goals_i_follow is working w/out fail
--fitbit integration for a step tracker and sleep tracker
--when someone accepts a team invitation and joins that team, a message needs to go out to every member of the team, and it should prompt each member to send a welcome message to that new team member
--email team members when someone leaves the team
--someone who already has a goal needs to be able to join it to a team if a matching invitation exists
(for admin user only for now... eventually enable for everyone but only once we have a searchable library that would make it relevant for others to find)
1. make a button in the normal "goals" view that checks if the goal is already part of a template... and if it's not, enable a button that would kick off copy_goal_to_template_and_make_template_parent
-- email the team when someone is slacking a lot and might be removed because of it
modify team:new and team:edit forms so that only relevant fields are shown to owners
change rights on team controller methods so that no one but admin and team owner can edit or delete a team
do not let owner change a team "type" from category to goal-specific once it is created (force delete instead)
[ ] let me craft an invite that has a link to start my goal (and if I have chosen category-level vs. goal-level, a link to start a custom or click from an array of templated goals in the same category)
[ ] let my invite go to multiple email addresses separated by commas
[ ] (teamgoals) do not kick people off of my custom team for not checking in
[ ] allow me to transfer ownership to another member of the team
[ ] notify every team member when a new member arrives
[ ] notify every team member when a member leaves
[ ] let me email the whole team
[ ] when emailing one team member ask me to consider including each of the others
[ ] when an invitee logs in, have an "invites" link at the top showing a red number and a listing of invites to review
[ ] allow an invitee to silently ignore an invite (do not email me)
[ ] allow an invitee to decline an invite (email me)
[ ] keep reminding an invitee for a while until they take action
[ ] later: team chat board
[ ] later: weekly meeting for those who cited weekly meeting availability windows that match (you must attend 2/3 of the meetings over a 3 month period) ... meetings can be in a google hangout URL or in the built-in chat board
[ ] later: nightly report option of "what went well today" and "what can i improve upon for tomorrow"
[ ] later: add an icon/mascot/avatar for our team)
[ ] later: add a "fade or not" photo mosaic linked to each team member's last 7 days ... one row per person)
--Display badges for those with 100+ 200+ ... etc. impact points
--Telling a long-standing goal to display all checkpoints takes forever... do some paging for this (ex: prod kaybing http://habitforge.com/goals/single/40822)
problem: if a cron job dies i am not aware
solution: look @ the latest cron job ... implement the same (it has a notify gmail that a script died)
future: put a silver or gold badge next to names on dynamic (and in their account) for impact point levels
future: make an option for showing in dynamic only those goals in your categories
future: program creation like the UWHealth "holiday don't gain"
-------------------- :::DONE::: -------------------------------
problem: people are starting to ask to cash in support points more than once
solution:
add a new user field that indicates that they've cashed one in already
modify the admin interface to indicate this and to not allow the single-press button