sub system to mange manual calls/reminders v2

Bug #564825 reported by HsienWen Hsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MVHub
In Progress
Low
Priya Ravindran

Bug Description

#################
subsystem Version 02:
 goal: make it easier to update out of date records.
#################

create a stand-alone report with it's own html template file
 that modifies the version 01 report

 Agency names should become links like:

   http://$ENV{HOST}/cgi-bin/mvhub/agency.pl?rm=display_agency_home&agency_id=103476

Where agency_id is matches agency_name displayed

Changed in mvhub:
assignee: nobody → HsienWen Hsu (hsienwen2007)
status: New → In Progress
Revision history for this message
Dan MacNeil (omacneil) wrote : Re: [Bug 564825] [NEW] sub system to mange manual calls/reminders v2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For Version #3, using CGI::Application and run modes will make it easier
to handle forms.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvI3HUACgkQLzI3mETyffx3FgCdHLm/A4B7y7gnnjRp01094BNX
tJAAniC6a6UkYqxvJVdbwHbyScirxSV0
=RNVg
-----END PGP SIGNATURE-----

Dan MacNeil (omacneil)
Changed in mvhub:
importance: Undecided → Low
assignee: HsienWen Hsu (hsienwen2007) → Priya Ravindran (priya)
Revision history for this message
Priya Ravindran (priya) wrote :

#TODO for version 2
1.Modify the prepare page so that the blue border will not show up
2.mailto link :move the message body to a template
3.Add anchor tags so that the last record edited is scrolled to

Revision history for this message
Priya Ravindran (priya) wrote :

we should validate form input for missing or bad input

Revision history for this message
Dan MacNeil (omacneil) wrote :

step 0
 update test data with reminder levels that exercise our code
  app-mvhub/project-tools/test_mvh_db.sql
  app-mvhub/project-tools/test_nsp_db.sql

 a. create new branch
 b. run mv_update_development
 c. get test data the way you want
 i. psql update program & agency to create records with reminder levels other than zero
 ii. some reminder levels should be 5

 d. use pg_dump to overwrite test_*_db.sql (above)
 e. commit , push,
 f. run mv_update_development
 i. as you
 ii. as Lee
  sudo su lgoodrich -l
  cdws
  bzr branch /var/www/mvhub/priya/source-code/$BRANCH_NAME/ .
  mv_set_active
  ...
  mv_update_development

 g. look for errors
 h. maybe edit dumps by hand to remove errors (as ***YOU***)
 i. push/merge request / blah blah blah

Note: --no-acl and -no-owner probably big things in pg_dump

  dig around for old procedure for saving test data
   # look for deleted files
   bzr log app-mvhub/doc
   # look at postgres dumping
    man pg_dump

pg_dump \
 --format=p \
 --file $MVH_DUMP_FILE.sql \
 --no-owner \
 --clean \
 --no-acl \
 -h localhost \
 -d production.mvh \
 -U production

###########################

1) Get data
 # new queries AGENCY_PROGRAM_X_EXPIRED_CALL_RECORDS
 # same as email reminder queries except also:
  record_type
  record_id
  contact_phone
  contact_fax
  contact_?

 MVHub::Notifications::get_expired_records(NEW_X_EXPIRED_PROGRAM_CALL_RECORDS)
 MVHub::Notifications::get_expired_records(NEW_X_EXPIRED_AGENCY_CALL_RECORDS)

 # modify to take sub ref for Notifications::_push_and_return_programs
 MVHub::Notifications::create_notifications_using( \sub_name )

 # example:
  mech/user/login_with_bad_password.t

 create:
   Notifications::_push_and_return_records_for_calls(
   push_on_me_aref=>'',record_name=>'',
   record_id=>'',record_type=
   )
  returns something like

   [
    {
     record_name_label=>''
     checkbox_name=>''
     record_type=> '';
    }
   ]

 #misc cleanup /refactoring
  rename
   Notifications::_push_and_return_programs
  to:
   Notifications::_push_and_return_records_for_emailing

2) format data for presentation
 (maybe) create:
  MVHub::Notifications::create_standard_notification_calls_with

3) present data in HTML::Template
 modify CallManager.pm to take new routines created in Notifications.pm
 modify call manger HTML template
  add inner TMPL_LOOP with checkboxes

4) handle data user gives us in form
 MVHub::CallManager::update_contact_info()

to:
 with new UPDATE PROGRAM and UPDATE AGENCY logic

4) maybe rename
 MVHub::CallManager::update_contact_info()
to:
 ???

5) test code

Revision history for this message
Dan MacNeil (omacneil) wrote :

for step 0
pg_Dump was successful...mv_upate_Development as me works...but to sudo as Lee I need the root password

for step1
two queries are created,and a new sub routine called get_expired_Call_records introduced into Notification.pm..get_Expired_records needs 8 parameteres/.. while get_expired_call_REcords needs only 6. so a new sub routine was introduced

Revision history for this message
Dan MacNeil (omacneil) wrote : Re: [Bug 564825] Re: sub system to mange manual calls/reminders v2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I can give you root pw, please pM me cell#

Alternatively, setup PGP for your email.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzULckACgkQeAqU5YwjhK+i6QCfVHkNzZSs9km0uynSssESX+Am
nwYAn0/tfJWWcyuUnCniy3VCTF1Y2KfM
=jO/D
-----END PGP SIGNATURE-----

Revision history for this message
Priya Ravindran (priya) wrote :

TODOs (partly replace earlier note)

finish:
     MVHub::Notificaitons::get_expired_call_records{

modify
          # take a sub ref to push sub routine
          # change: get_expired_call_records.t
         MVHub::Notificaitons::create_notifications_using{

        # add templ loop for data
         call_manger.tmpl

          # call Notifications::create_notifications_using()
          CallManager.pm

    handle data user gives us in form
    MVHub::CallManager::update_contact_info()
  to:
   with new UPDATE PROGRAM and UPDATE AGENCY logic

4) maybe rename
 MVHub::CallManager::update_contact_info()
to:
 ???

create:

add tests:
    ....Notifications/get_expired_call_records.t

Revision history for this message
Priya Ravindran (priya) wrote :

current branch lp:~priya/mvhub/call_manager2

has update annomaly bug..manual test to reproduce uncheck first program record for update and change first name...submit the form...display records...The first name is lost.

Root cause contact details not normalized in the agency and program tables. Call manager code displays records based on contact email and agency_id. THe above data is not lost if the contact email is changed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.