fixed: edit branch only changes meta data fields if another value is changed
This commit is contained in:
parent
35890cc120
commit
11184d7a15
2 changed files with 20 additions and 15 deletions
|
|
@ -9,6 +9,7 @@
|
|||
- fixed: Alias field in user profiling
|
||||
- fixed: Email Receipt after Successful Checkout
|
||||
- fixed: DataForm captcha doesn't show up
|
||||
- fixed: edit branch only changes meta data fields if another value is changed
|
||||
|
||||
7.5.16
|
||||
- Created a migration from 7.4.40 directly to 7.5.16.
|
||||
|
|
|
|||
|
|
@ -285,21 +285,25 @@ sub www_editBranchSave {
|
|||
$wobjectData{url} = $data{url};
|
||||
}
|
||||
my $newData = $descendant->isa('WebGUI::Asset::Wobject') ? \%wobjectData : \%data;
|
||||
next
|
||||
if (scalar %$newData == 0);
|
||||
my $newRevision = $descendant->addRevision(
|
||||
$newData,
|
||||
undef,
|
||||
{skipAutoCommitWorkflows => 1, skipNotification => 1},
|
||||
);
|
||||
foreach my $form ($self->session->form->param) {
|
||||
if ($form =~ /^metadata_(.*)$/) {
|
||||
my $fieldName = $1;
|
||||
if ($self->session->form->yesNo("change_metadata_".$fieldName)) {
|
||||
$newRevision->updateMetaData($fieldName,$self->session->form->process($form));
|
||||
}
|
||||
}
|
||||
}
|
||||
my $revision;
|
||||
if (scalar %$newData > 0) {
|
||||
$revision = $descendant->addRevision(
|
||||
$newData,
|
||||
undef,
|
||||
{skipAutoCommitWorkflows => 1, skipNotification => 1},
|
||||
);
|
||||
}
|
||||
else {
|
||||
$revision = $descendant;
|
||||
}
|
||||
foreach my $form ($self->session->form->param) {
|
||||
if ($form =~ /^metadata_(.*)$/) {
|
||||
my $fieldName = $1;
|
||||
if ($self->session->form->yesNo("change_metadata_".$fieldName)) {
|
||||
$revision->updateMetaData($fieldName,$self->session->form->process($form));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($self->session->setting->get("autoRequestCommit")) {
|
||||
if ($self->session->setting->get("skipCommitComments")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue