EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #01028
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Empty eprints when clicked "new item" but then "cancel"
- To: <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Empty eprints when clicked "new item" but then "cancel"
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- Date: Wed, 05 Sep 2012 13:39:37 +0100
On Fri, 31 Aug 2012 14:05:48 +0200, Florian Heß
<hess@ub.uni-heidelberg.de>
wrote:
> Hello,
>
> I'd like to suggest that an eprint should be deleted right away if the
> user cancelled the workflow without filling in any required field, thus
> they won't clutter up their items page with spare entries to remove them
> by hand, just for convenience. I admit this case will not occur often
> once deployment is finished, but when it does, it can be quite annoying.
>
> Or could that be done with eprint_fields_automatic callback?
>
> $c->{eprint_fields_automatic} = sub {
> ...
> my %expected_fields = map { $_ => 1 } ...;
> my @set_fields = ...;
> defined || delete $expected_fields{$_} for @set_fields;
> $eprint->delete() if !%expected_fields;
> }
>
> Is deletion from within that callback safe and okay?
Hi,
This is a known requirement but not easy to achieve.
(Screens) EPrint::Edit needs to work out whether the eprint object is
unchanged from the object created in NewEPrint. That probably means setting
a flag in NewEPrint that is unset the first time you [Save] in Edit, but
otherwise triggers a delete() on [Cancel].
--
All the best,
Tim.
- References:
- [EP-tech] Empty eprints when clicked "new item" but then "cancel"
- From: Florian Heß <hess@ub.uni-heidelberg.de>
- [EP-tech] Empty eprints when clicked "new item" but then "cancel"
- Prev by Date: [EP-tech] Re: {Disarmed} Citation Count Dataset and Import Plug-ins for GNU EPrints 3
- Next by Date: [EP-tech] Re: Update EPrints 3.1.1 - 3.3.10
- Previous by thread: [EP-tech] Empty eprints when clicked "new item" but then "cancel"
- Next by thread: [EP-tech] Manage Metadata Fields UI
- Index(es):
