Ticket #3829 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Ordering/adding spaces does not work for document field

Reported by: tmb Owned by: cjg
Priority: Intend to Milestone: 3.2.4
Component: Workflow & InputForm Version: 3.2
Severity: normal Keywords:
Cc:

Description

To reproduce:

  • add a new field to documents.pl
        {
                name => "foo",
                type => "text",
                input_ordered => 1,
                multiple => 1,
        },
  • bin/epadmin update_database_structure
  • add foo to workflow in <component field="Documents"> section
  • restart apache
  • create new item and go to Upload stage
  • upload document
  • up/down and "more input rows" buttons have no effect for foo field

Attachments

InputForm_Component_Documents.pm.diff Download (0.8 KB) - added by tmb 4 years ago.
MetaField.pm.diff Download (2.9 KB) - added by tmb 4 years ago.

Change History

Changed 4 years ago by tmb

Changed 4 years ago by tmb

Changed 4 years ago by tmb

The Documents inputform plugin should call get_state_params() for the fields it displays. InputForm?_Component_Documents.pm.diff fixes this.

With this patch up/down/morespaces now work, BUT if there is >1 document, changing the order of foo for one document changes the order for ALL documents - similar for more input rows. The issue is Metafield.pm uses the field name rather than the basename for the up/down/morespaces param/button IDs - MetaField?.pm.diff fixes this.

However there are still problems - eg. inconsistent use of prefix parameter to MetaField::get_state_params (compare perl_lib/EPrints/Plugin/InputForm/Component/Field/Multi.pm and perl_lib/EPrints/Plugin/InputForm/Component/Field.pm) which breaks up/down/morespaces inside a Multi component.

Changed 4 years ago by tdb01r

  • milestone changed from EPrints 3.2.x (general bugs/features for 3.2) to 3.2.4

Resolved by r5638.

Changed 4 years ago by tdb01r

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.