diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 7e54d0e54..a94f99e58 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,19 +1,21 @@ 6.99.0 + - Added a workflow system. + - Added a workflow scheduler system. + - Converted the runHourly.pl scripts to run as scheduled workflows. + - Added version tags menu to admin bar. + - Added versioning commit comments. + - Removed autocommit mode in favor of workflow controlled commits. + - Added a revisions list to the edit screen of assets, so that you can + quickly edit/view an old revision. - Addded a lock menu item to explicitly lock an asset from editing. - Run on registration and alert on new user have been converted to a single workflow. - Many changes for better XHTML compliance. - Refactored admin bar to be more dynamic. - - Added version tags menu to admin bar. - - Added a revisions list to the edit screen of assets, so that you can - quickly edit/view an old revision. - Removed start/end dates from assets in favor of the workflow system. - Readded the purge option to the trash manager. - Added archive/unarchive options to CS threads. - Added a database cache option as an alternative to memcached. - - Added a workflow system. - - Added a workflow scheduler system. - - Converted the runHourly.pl scripts to run as scheduled workflows. - Converted WebGUI to use a new object oriented session system. More details in migation.txt. - Added a lot more tests to the test suite. diff --git a/docs/upgrades/upgrade_6.8.7-6.99.0.pl b/docs/upgrades/upgrade_6.8.7-6.99.0.pl index 90a9f56be..00205675d 100644 --- a/docs/upgrades/upgrade_6.8.7-6.99.0.pl +++ b/docs/upgrades/upgrade_6.8.7-6.99.0.pl @@ -78,6 +78,7 @@ sub addWorkflow { $session->db->write("alter table assetVersionTag add column lockedBy varchar(22) binary not null"); $session->db->write("alter table assetVersionTag add column groupToUse varchar(22) binary not null"); $session->db->write("alter table assetVersionTag add column workflowId varchar(22) binary not null"); + $session->db->write("alter table assetVersionTag add column comments text"); $session->db->write("create table WorkflowSchedule ( taskId varchar(22) binary not null primary key, title varchar(255) not null default 'Untitled', diff --git a/lib/WebGUI/Macro/AdminBar.pm b/lib/WebGUI/Macro/AdminBar.pm index ba6942f29..79c48a2b1 100644 --- a/lib/WebGUI/Macro/AdminBar.pm +++ b/lib/WebGUI/Macro/AdminBar.pm @@ -103,7 +103,7 @@ sub process { if ($working) { $workingId = $working->getId; push(@tags, { - url=>$session->url->page("op=commitVersionTag;backToSite=1;tagId=".$workingId), + url=>$session->url->page("op=commitVersionTag;tagId=".$workingId), title=>$i18n->get("commit my changes"), icon=>$session->config->get("extrasURL").'/adminConsole/small/versionTags.gif' }); diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 1f170fd01..e03b4230b 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -80,6 +80,7 @@ sub getOperations { 'editVersionTag' => 'WebGUI::Operation::VersionTag', 'editVersionTagSave' => 'WebGUI::Operation::VersionTag', 'commitVersionTag' => 'WebGUI::Operation::VersionTag', + 'commitVersionTagConfirm' => 'WebGUI::Operation::VersionTag', 'manageCommittedVersions' => 'WebGUI::Operation::VersionTag', 'manageVersions' => 'WebGUI::Operation::VersionTag', 'manageRevisionsInTag' => 'WebGUI::Operation::VersionTag', diff --git a/lib/WebGUI/Operation/VersionTag.pm b/lib/WebGUI/Operation/VersionTag.pm index c2edbf192..b062e52da 100644 --- a/lib/WebGUI/Operation/VersionTag.pm +++ b/lib/WebGUI/Operation/VersionTag.pm @@ -146,9 +146,9 @@ sub www_editVersionTagSave { #------------------------------------------------------------------- -=head2 www_commitVersionTag ( session ) +=head2 www_commitVersionTag ( session ) -Commits a version tag. +Prompts a user to apply some comments before they commit their tag. =head3 session @@ -161,16 +161,69 @@ sub www_commitVersionTag { my $tagId = $session->form->param("tagId"); if ($tagId) { my $tag = WebGUI::VersionTag->new($session, $tagId); - $tag->commit if (defined $tag && $session->user->isInGroup($tag->get("groupToUse"))); - } - if ($session->form->get("backToSite")) { - return ""; + if (defined $tag && $session->user->isInGroup($tag->get("groupToUse"))) { + my $i18n = WebGUI::International->new($session, "VersionTag"); + my $f = WebGUI::HTMLForm->new($session); + $f->readOnly( + label=>$i18n->get("version tag name"), + value=>$tag->get("name") + ); + $f->hidden( + name=>"tagId", + value=>$session->form->param("tagId") + ); + $f->hidden( + name=>"op", + value=>"commitVersionTagConfirm" + ); + $f->textarea( + name=>"comments", + label=>$i18n->get("comments") + ); + $f->submit; + my $ac = WebGUI::AdminConsole->new($session,"versions"); + return $ac->render($f->print); + } } return www_manageVersions($session); } #------------------------------------------------------------------- +=head2 www_commitVersionTagConfirm ( session ) + +Commits a version tag. + +=head3 session + +A reference to the current session. + +=cut + +sub www_commitVersionTagConfirm { + my $session = shift; + my $tagId = $session->form->param("tagId"); + if ($tagId) { + my $tag = WebGUI::VersionTag->new($session, $tagId); + if (defined $tag && $session->user->isInGroup($tag->get("groupToUse"))) { + $tag->set({comments=>$session->form->process("comments", "textarea")}); + $tag->commit; + my $i18n = WebGUI::International->new($session, "VersionTag"); + my $ac = WebGUI::AdminConsole->new($session,"versions"); + $ac->render( + '
'.$i18n->get("commit accepted").'
' + .'' + ); + } + } + return www_manageVersions($session); +} + +#------------------------------------------------------------------- + =head2 www_manageCommittedVersions ( session ) Shows a list of the currently available asset version tags. @@ -315,7 +368,7 @@ sub www_manageRevisionsInTag { if ($tag->get("comments")) { my $comments = $tag->get("comments"); $comments =~ s/\n/'.$comments.'
'; + $output .= $comments; } $output .= '| '.$i18n->get(99,"Asset").' | '.$i18n->get("type","Asset").' | '.$i18n->get("revision date","Asset").' | '.$i18n->get("revised by","Asset").' |
|---|