workflow with approval officially works
This commit is contained in:
parent
a78932b3b2
commit
59afc74303
7 changed files with 15 additions and 54 deletions
|
|
@ -65,12 +65,6 @@ sub definition {
|
|||
label=>$i18n->get("who to notify"),
|
||||
hoverHelp=>$i18n->get("who to notify help")
|
||||
},
|
||||
subject => {
|
||||
fieldType=>"text",
|
||||
defaultValue=>"",
|
||||
label=>$i18n->get("notify subject"),
|
||||
hoverHelp => $i18n->get("notify subject help")
|
||||
},
|
||||
message => {
|
||||
fieldType=>"textarea",
|
||||
defaultValue => "",
|
||||
|
|
@ -97,8 +91,8 @@ sub execute {
|
|||
my $inbox = WebGUI::Inbox->new($self->session);
|
||||
my $properties = {
|
||||
status=>"completed",
|
||||
subject=>$self->get("subject"),
|
||||
message=>$self->get("message")."\n\n".$versionTag->get("name")."\n\n".$versionTag->get("comments"),
|
||||
subject=>$versionTag->get("name"),
|
||||
message=>$self->get("message")."\n\n".$versionTag->get("comments"),
|
||||
};
|
||||
if ($self->get("who") eq "committer") {
|
||||
$properties->{userId} = $versionTag->get("committedBy");
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use strict;
|
|||
use base 'WebGUI::Workflow::Activity';
|
||||
use WebGUI::VersionTag;
|
||||
use WebGUI::Inbox;
|
||||
use WebGUI::International;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -60,12 +61,6 @@ sub definition {
|
|||
label=>$i18n->get("group to approve"),
|
||||
hoverHelp=>$i18n->get("group to approve help")
|
||||
},
|
||||
subject => {
|
||||
fieldType=>"text",
|
||||
defaultValue=>"",
|
||||
label=>$i18n->get("approval subject"),
|
||||
hoverHelp => $i18n->get("approval subject help")
|
||||
},
|
||||
message => {
|
||||
fieldType=>"textarea",
|
||||
defaultValue => "",
|
||||
|
|
@ -96,13 +91,14 @@ sub execute {
|
|||
my $self = shift;
|
||||
my $versionTag = shift;
|
||||
my $instance = shift;
|
||||
my $i18n = WebGUI::International->new($self->session, "VersionTag");
|
||||
my $inbox = WebGUI::Inbox->new($self->session);
|
||||
if ($instance->getScratch("status") eq "") {
|
||||
my $message = $inbox->addMessage({
|
||||
subject=>$self->get("subject"),
|
||||
subject=>$i18n->get("approve/deny").": ".$versionTag->get("name"),
|
||||
message=>join("\n\n",$self->get("message"),
|
||||
$self->session->url->page("op=manageRevisionsInTag;workflowInstanceId=".$instance->getId.";tagId=".$versionTag->getId),
|
||||
$versionTag->get('name'), $versionTag->get("comments")),
|
||||
$self->session->url->getSiteURL().$self->session->url->page("op=manageRevisionsInTag;workflowInstanceId=".$instance->getId.";tagId=".$versionTag->getId),
|
||||
$versionTag->get("comments")),
|
||||
groupId=>$self->get("groupToApprove"),
|
||||
status=>'pending'
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue