#246: WebSubmit: add report number validation to Get_Report_Number function
-------------------------+--------------------------------------------------
 Reporter:  jcaffaro     |       Owner:      
     Type:  enhancement  |      Status:  new 
 Priority:  major        |   Milestone:  v1.0
Component:  WebSubmit    |     Version:      
 Keywords:               |  
-------------------------+--------------------------------------------------
 Submissions that perform modifications on existing records must usually
 check that they are processing records that are valid for their workflow.
 This is usually achieved with an additional, customized WebSubmit function
 at the beginning of the workflow that check the format of the specified
 report number. It would be desirable to plug some basic checking
 capabilities right in the Get_Report_Number function.

 A possibility would be to add a new parameter {{{rn_format}}} that would
 describe the accepted format for report numbers. The syntax of this format
 could be similar to the one used in {{{Report_Number_Generation}}}
 function (eg. {{{DEMO-PICTURE-<PA>categ</PA>-<PA>yy</PA>}}}) or simply a
 regular expression for better expressiveness. In any case both of the
 suggested solutions would have to be adapted to support for eg. any
 character matching (.*) and validation against the context, in particular
 the currently selected category (it is important that someone allowed to
 modify the category "Article" of the DEMOART submission cannot select the
 "Article" category and then input report number matching a "Preprint"
 one.)

 For eg. the MBI action of the DEMOPOE submission could specify
 {{{rn_format=DEMO-POETRY-\d{4}-\d{3} }}} or {{{rn_format=DEMO-
 POETRY-%(category)s-\d{4}-\d{3} }}} in the case of a category based
 submission (the "category" parameters must match the value in
 {{{curdir/comboDEMOPOE}}})

 This improvement would only provide basic check on the report number
 format, but would cover many needs. More advanced checks would still have
 to be performed using customized WebSubmit functions.

-- 
Ticket URL: <http://invenio-software.org/ticket/246>
Invenio <http://invenio-software.org>

Reply via email to