This is an automated notification sent by LCG Savannah.
It relates to:
                task #9204, project CDS Invenio

==============================================================================
 OVERVIEW of task #9204:
==============================================================================

URL:
  <http://savannah.cern.ch/task/?9204>

                 Summary: DEMOBOO and Send_Approval_Request with
categ="unknown"
                 Project: CDS Invenio
            Submitted by: skaplun
            Submitted on: 2009-03-05 16:41
         Should Start On: 2009-03-05 00:00
   Should be Finished on: 2009-03-05 00:00
                Category: WebSubmit
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: skaplun
             Open/Closed: Open
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________


[...]
While experimenting with DEMOBOO when trying to see how things work, I  
realised that
there are some MINOR problems with that doctype, some of which have to  
do with the fact that there is only one category in this doctype, so  
comboDEMOBOO is never defined, resulting into a categ=unknown in the  
sbmAPPROVAL table.
Although you've taken this into account in many places (publiline.py,  
Send_APP_Mail.py among other), there is a tiny glitch:
categformatDAM parameter in the Send_Approval_Request Function is not  
defined in the demo site (and how could it be, since <CATEG> must be  
'unknown') resulting in the following exception in publiline.py:
[...]

File "/opt/cds-invenio/var/www/publiline.py", line 361, in displayDocument
    SendEnglish(doctype,categ,RN,title,authors,access,sysno)

  File "/opt/cds-invenio/var/www/publiline.py", line 1501, in SendEnglish
    categ = categs.group(1)

IndexError: no such group

One solution would be to define categformatDAM=<CATEG> (or something  
dummy that would result in CATEG=unknown) and let the  
Send_Approval_Request function take care of the rest.
This stops the exception from appearing and everyone is happy, but  
thinks get a bit tricky if you decide later to ADD some categories to  
the doctype... For example, even if you redefine correctly all the  
relevant parameters, in your submission/approval window, all the  
relevant submissions that had categ=unknown will be lost (not shown).  
Of course you fix this by again taking care of that possibility, OR...

Starting from the beginning, create ONE category in the DEMOBOO  
doctype (ie categ=BOOK),
Apply the following patch in the websubmit_templates.py:
310c310
<         if len(snameCateg)>1 :
---
>         if len(snameCateg) :
319,324d318
<       elif len(snameCateg)==1 :
<           out += """<input type="hidden" name="combo%(doctype)s"  
value="%(shortname)s" />""" % {
<                       'shortname' : snameCateg[0],
<                       'doctype' : doctype,
<               }
<             out += "<script>checked=1;</script>"

that passes the hidden value comboDEMOBOO=BOOK to the submission  
system WITHOUT showing a radio button, then set  
categformatDAM=DEMO-<CATEG>-* as usual, and that's it! (...I think)
[...]



    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
2195                                | -SUB-
[email protected]               | 




==============================================================================

This item URL is:
  <http://savannah.cern.ch/task/?9204>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/

Reply via email to