diff --git a/docs/upgrades/packages-7.8.6/root_import_ems_ems-badge-listing-default.wgpkg b/docs/upgrades/packages-7.8.6/root_import_ems_ems-badge-listing-default.wgpkg new file mode 100644 index 000000000..811ff0dfe Binary files /dev/null and b/docs/upgrades/packages-7.8.6/root_import_ems_ems-badge-listing-default.wgpkg differ diff --git a/docs/upgrades/packages-7.8.6/root_import_ems_ems-event-submission-queue.wgpkg b/docs/upgrades/packages-7.8.6/root_import_ems_ems-event-submission-queue.wgpkg new file mode 100644 index 000000000..bdbe79dd8 Binary files /dev/null and b/docs/upgrades/packages-7.8.6/root_import_ems_ems-event-submission-queue.wgpkg differ diff --git a/docs/upgrades/upgrade_7.8.5-7.8.6.pl b/docs/upgrades/upgrade_7.8.5-7.8.6.pl index c75bf482d..b6275e957 100644 --- a/docs/upgrades/upgrade_7.8.5-7.8.6.pl +++ b/docs/upgrades/upgrade_7.8.5-7.8.6.pl @@ -35,6 +35,22 @@ my $session = start(); # this line required finish($session); # this line required +#---------------------------------------------------------------------------- +# Describe what our function does +sub deleteFieldFromEMSSubmission { + my $session = shift; + print "\tDrop collumn from EMS Submission Table... " unless $quiet; + my $db = $session->db; + + $db->write(<update(lastReplyBy => $self->session->user->userId); $self->next::method(@_); $self->sendEmailUpdate; } @@ -207,13 +208,6 @@ sub definition { fieldType => "hidden", defaultValue => '{}', }, - sendEmailOnChange => { - tab => "properties", - fieldType => "yesNo", - defaultValue => 1, - label => $i18n->get("send email label"), - hoverHelp => $i18n->get("send email label help") - }, ticketId => { noFormPost => 1, fieldType => "hidden", @@ -355,15 +349,13 @@ sub sendEmailUpdate { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new( $session, "Asset_EMSSubmission" ); - if( $self->get('sendEmailOnChange') ) { - WebGUI::Inbox->new($session)->addMessage( { - status => 'unread', + WebGUI::Inbox->new($session)->addMessage( { + status => 'unread', message => $i18n->get('your submission has been updated') . "\n\n" . - $self->get('title'), + $self->get('title'), userId => $self->get('createdBy'), sentBy => $session->user->userId, - }); - } + }); } #------------------------------------------------------------------- @@ -410,7 +402,7 @@ sub www_editSubmission { $newform->hidden(name => 'assetId', value => $assetId); my $formDescription = $parent->getFormDescription; my @defs = reverse @{__PACKAGE__->definition($session)}; - my @fieldNames = qw/title submissionStatus sendEmailOnChange startDate duration seatsAvailable location description/; + my @fieldNames = qw/title submissionStatus startDate duration seatsAvailable location description/; my $fields; for my $def ( @defs ) { my $properties = $def->{properties}; @@ -462,7 +454,7 @@ sub www_editSubmission { } } $newform->submit; - my $title = $assetId eq 'new' ? $i18n->get('new submission') : $asset->get('title'); + my $title = $asset->get('title'); my $content = $asset->processTemplate({ errors => $params->{errors} || [], diff --git a/lib/WebGUI/Asset/EMSSubmissionForm.pm b/lib/WebGUI/Asset/EMSSubmissionForm.pm index f241eba46..085ecfd3d 100644 --- a/lib/WebGUI/Asset/EMSSubmissionForm.pm +++ b/lib/WebGUI/Asset/EMSSubmissionForm.pm @@ -277,7 +277,7 @@ sub www_editSubmissionForm { my $formDescription = $params->{formDescription} || $self ? $self->getFormDescription : { }; for my $fieldId ( @fieldNames ) { - next if $fieldId =~ /^(submissionStatus|sendEmailOnChange)$/; + next if $fieldId eq 'submissionStatus'; my $field = $fields->{$fieldId}; $newform->yesNo( label => $field->{label}, @@ -474,7 +474,6 @@ sub processForm { my @fieldNames = split( ' ', $form->get('fieldNames') ); $params->{formDescription} = { map { $_ => $form->get($_ . '_yesNo') } ( @fieldNames ) }; $params->{formDescription}{submissionStatus} = 0; - $params->{formDescription}{sendEmailOnChange} = 1; $params->{formDescription}{_fieldList} = [ map { $params->{formDescription}{$_} ? $_ : () } ( @fieldNames ) ]; if( scalar( @{$params->{formDescription}{_fieldList}} ) == 0 ) { $params->{_isValid} = 0; diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index c4c32d1f0..78394896b 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -499,7 +499,7 @@ sub getSubmissionLocations { my $self = shift; my $text = $self->get('submittedLocationsList'); return undef if $text eq ''; - return [ split( /[\s\n]+/, $text ) ]; + return [ split( /[\n]+/, $text ) ]; } #------------------------------------------------------------------- @@ -2737,8 +2737,8 @@ sub www_viewSubmissionQueue { for my $tabSource ( @{$self->getSubmissionForms} ) { push @{$params->{tabs}}, $tabSource->www_editSubmissionForm( { asHashRef => 1 } ); } - if( scalar( @{$params->{tabs}} ) == 1 ) { # there were no existing forms - push @{$params->{tabs}}, $self->www_addSubmissionForm( { asHashRef => 1 } ); + push @{$params->{tabs}}, $self->www_addSubmissionForm( { asHashRef => 1 } ); + if( scalar( @{$params->{tabs}} ) == 2 ) { # there were no existing forms $params->{tabs}[1]{selected} = 1; # the new submission form tab } else { $params->{tabs}[0]{selected} = 1; # the submission queue tab @@ -2749,7 +2749,7 @@ sub www_viewSubmissionQueue { next unless $tabSource->canSubmit; push @{$params->{tabs}}, $tabSource->www_addSubmission( { asHashRef => 1 } ); } - $params->{tabs}[$#{$params->{tabs}}]{selected} = 1; + $params->{tabs}[0]{selected} = 1; } my $tabid = 'tab01'; for my $tab ( @{$params->{tabs}} ) { $tab->{id} = $tabid ++; } diff --git a/lib/WebGUI/i18n/English/Asset_EMSSubmission.pm b/lib/WebGUI/i18n/English/Asset_EMSSubmission.pm index b0279de9f..9d3c8bd8a 100644 --- a/lib/WebGUI/i18n/English/Asset_EMSSubmission.pm +++ b/lib/WebGUI/i18n/English/Asset_EMSSubmission.pm @@ -9,16 +9,6 @@ our $I18N = { ##hashref of hashes lastUpdated => 1131394072, context => q|Then name of the Asset ( Event Management System - Event Submission ).| }, - 'send email label' => { - message => q|Send Email when Submission Editted|, - lastUpdated => 1131394072, - context => q|This is the lable for the flag for setting the option to send email to the owner when the submission is edited.| - }, - 'send email label help' => { - message => q|Check this box if you would like to recieve email for all changes made to your submission|, - lastUpdated => 1131394072, - context => q|This is the help text for the 'send email' flag. If set to 'Yes', the user will recieve email for every change made to the submission.| - }, 'comments' => { message => q|Comments|, diff --git a/t/Asset/EMSSubmissionForm.t b/t/Asset/EMSSubmissionForm.t index b9545e944..dd3d16fd4 100644 --- a/t/Asset/EMSSubmissionForm.t +++ b/t/Asset/EMSSubmissionForm.t @@ -419,7 +419,6 @@ my $expected = { 'startDate' => '1', 'description' => '1', 'submissionStatus' => '0', - sendEmailOnChange => 1, '_fieldList' => [ 'title', 'description', @@ -465,7 +464,6 @@ $expected = { 'formDescription' => { '_fieldList' => [], 'submissionStatus' => 0, - sendEmailOnChange => 1, }, 'description' => undef, '_isValid' => 0,