a bunch of bug fixes and tweaks related to workflow/versioning
This commit is contained in:
parent
f73b2996da
commit
985417afd3
9 changed files with 38 additions and 9 deletions
|
|
@ -270,7 +270,7 @@ Verifies proper inputs in the Asset Tree and saves them. Returns ManageAssets me
|
|||
|
||||
sub www_editBranchSave {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit && WebGUI::Grouping::isInGroup('4'));
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit && $self->session->user->isInGroup('4'));
|
||||
my %data;
|
||||
$data{isHidden} = $self->session->form->yesNo("isHidden") if ($self->session->form->yesNo("change_isHidden"));
|
||||
$data{newWindow} = $self->session->form->yesNo("newWindow") if ($self->session->form->yesNo("change_newWindow"));
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ Shows a list of the revisions for this asset.
|
|||
sub www_manageRevisions {
|
||||
my $self = shift;
|
||||
my $ac = WebGUI::AdminConsole->new($self->session,"versions");
|
||||
return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(3));
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my $i18n = WebGUI::International->new($self->session,"Asset");
|
||||
my $output = '<table width=100% class="content">
|
||||
<tr><th></th><th>Revision Date</th><th>Revised By</th><th>Tag Name</th></tr> ';
|
||||
|
|
|
|||
|
|
@ -106,8 +106,9 @@ sub process {
|
|||
icon=>$session->config->get("extrasURL").'/adminConsole/small/versionTags.gif'
|
||||
});
|
||||
}
|
||||
my $rs = $session->db->read("select tagId, name from assetVersionTag where isCommitted=0 and isLocked=0 order by name");
|
||||
while (my ($id, $name) = $rs->array) {
|
||||
my $rs = $session->db->read("select tagId, name, groupToUse from assetVersionTag where isCommitted=0 and isLocked=0 order by name");
|
||||
while (my ($id, $name, $group) = $rs->array) {
|
||||
next unless $session->user->isInGroup($group);
|
||||
push(@tags, {
|
||||
url=>$session->url->page("op=setWorkingVersionTag;backToSite=1;tagId=".$id),
|
||||
title=>($id eq $workingId) ? '<span style="color: #000080;">* '.$name.'</span>' : $name,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,11 @@ sub www_addWorkflow {
|
|||
);
|
||||
my %options = ();
|
||||
foreach my $object (keys %{$session->config->get("workflowActivities")}) {
|
||||
$options{$object} = $object;
|
||||
if ($object eq "None") {
|
||||
$options{$object} = $i18n->get("no object");
|
||||
} else {
|
||||
$options{$object} = $object;
|
||||
}
|
||||
}
|
||||
$f->selectBox(
|
||||
name=>"type",
|
||||
|
|
|
|||
|
|
@ -340,11 +340,11 @@ sub set {
|
|||
$self->{_data}{workflowId} = $properties->{workflowId} || $self->{_data}{workflowId} || $self->session->setting->get("defaultVersionTagWorkflow");
|
||||
$self->{_data}{groupToUse} = $properties->{groupToUse} || $self->{_data}{groupToUse} || "12";
|
||||
if (exists $properties->{comments}) {
|
||||
$self->{_data}{comments}=$self->{_data}{comments}
|
||||
.$self->session->datetime->epochToHuman.' - '.$self->session->user->username
|
||||
$self->{_data}{comments}=$self->session->datetime->epochToHuman.' - '.$self->session->user->username
|
||||
."\n"
|
||||
.$properties->{comments}
|
||||
."\n\n";
|
||||
."\n\n"
|
||||
.$self->{_data}{comments};
|
||||
}
|
||||
$self->session->db->setRow("assetVersionTag","tagId",$self->{_data});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ See WebGUI::Workflow::Activity::execute() for details.
|
|||
|
||||
sub execute {
|
||||
my $self = shift;
|
||||
my $start = time();
|
||||
foreach my $id (@{WebGUI::Mail::Send->getMessageIdsInQueue($self->session)}) {
|
||||
my $message = WebGUI::Mail::Send->retrieve($self->session, $id);
|
||||
if (defined $message) {
|
||||
|
|
@ -77,6 +78,8 @@ sub execute {
|
|||
$message->queue;
|
||||
}
|
||||
}
|
||||
# just in case there are a lot of messages, we should release after a minutes worth of sending
|
||||
last if (time() > $start + 60);
|
||||
}
|
||||
return $self->COMPLETE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
package WebGUI::i18n::English::Workflow;
|
||||
|
||||
our $I18N = {
|
||||
'no object' => {
|
||||
message => q|No Object|,
|
||||
context => q|used when selecting an object type to be passed through a workflow|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'confirm delete activity' => {
|
||||
message => q|Are you certain you wish to delete this activity from this workflow?|,
|
||||
context => q|prompt the user before deleting an activity from a workflow|,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue