projects
/
eq
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7e17eca
)
Fixed import script so it sets "attending" correctly so that attendance gets prepopul...
author
Owen Leonard
<owen@balawis.leonard.fam>
Mon, 20 Sep 2010 04:39:16 +0000
(22:39 -0600)
committer
Owen Leonard
<owen@balawis.leonard.fam>
Mon, 20 Sep 2010 04:39:16 +0000
(22:39 -0600)
bin/import_ward_data
patch
|
blob
|
history
diff --git
a/bin/import_ward_data
b/bin/import_ward_data
index c61f2a60dabef58cd351fb2982aeb6ecea8c8ef8..6fbb96b3ba1e7400a251c92c2b6f546ca583a60d 100755
(executable)
--- a/
bin/import_ward_data
+++ b/
bin/import_ward_data
@@
-138,22
+138,22
@@
sub update_tc_individual_table
$phone = $membership_data{$index}{'Household Phone'};
$priesthood = $membership_data{$index}{'Priesthood'};
$hhposition = $membership_data{$index}{'HH Position'};
$phone = $membership_data{$index}{'Household Phone'};
$priesthood = $membership_data{$index}{'Priesthood'};
$hhposition = $membership_data{$index}{'HH Position'};
-
$steward = ""; # This will be set later
-
# Default to the "Elders" quorum if the Organization data per member isn't available
+ $steward = ""; # This will be set later
+ # Default to the "Elders" quorum if the Organization data per member isn't available
# Only add "Elders" to the quorum since we don't have any other data availalbe to us to make a call
# TODO: make steward flexible with a setting in the config file
# Only add "Elders" to the quorum since we don't have any other data availalbe to us to make a call
# TODO: make steward flexible with a setting in the config file
-
if((! -e "$datadir/Organization\ class\ per\ member.csv") && ($priesthood =~ /Elder/i)) {
+ if((! -e "$datadir/Organization\ class\ per\ member.csv") && ($priesthood =~ /Elder/i)) {
$steward = "Elder";
$organization = "Elders";
}
$steward = "Elder";
$organization = "Elders";
}
-
# Preferred method is to pull organization data from the csv file
+ # Preferred method is to pull organization data from the csv file
else { $organization = $organization_by_id{$id}; }
$attending = 0;
if(($organization =~ /Elders/) ||
($organization =~ /Young Men/) ||
($organization =~ /Sunday School/) ||
($organization =~ /Primary/)
else { $organization = $organization_by_id{$id}; }
$attending = 0;
if(($organization =~ /Elders/) ||
($organization =~ /Young Men/) ||
($organization =~ /Sunday School/) ||
($organization =~ /Primary/)
-
) { $attending = 1; }
+ ) { $attending = 1; }
if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; }
if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; }
$email = $membership_data{$index}{'indiv E-mail'};
if($phone =~ /(\d\d\d-\d\d\d\d)/) { $phone = "$areacode-$1"; }
if($phone =~ /^\(\d\d\d\) (\d\d\d-\d\d\d\d)/) { $phone = "$1-$2"; }
$email = $membership_data{$index}{'indiv E-mail'};
@@
-230,6
+230,7
@@
sub update_tc_calling_table()
$name =~ s/\'/\\'/g; #'
$organization = $organization_data{$index}{'Organization'};
$organization_by_name{$name} = $organization;
$name =~ s/\'/\\'/g; #'
$organization = $organization_data{$index}{'Organization'};
$organization_by_name{$name} = $organization;
+ $indiv_id = $organization_data{$index}{'Indiv ID'};
$organization_by_id{$indiv_id} = $organization;
$position = $organization_data{$index}{'Position'};
$sustained = $organization_data{$index}{'Sustained'};
$organization_by_id{$indiv_id} = $organization;
$position = $organization_data{$index}{'Position'};
$sustained = $organization_data{$index}{'Sustained'};