chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernhard Reutner-Fischer (JIRA)" <>
Subject [jira] Created: (CMIS-295) Unable to set or retrieve Document "description" property a.k.a "summary"
Date Fri, 21 Jan 2011 09:44:45 GMT
Unable to set or retrieve Document "description" property a.k.a "summary"

                 Key: CMIS-295
             Project: Chemistry
          Issue Type: Bug
          Components: python-cmislib
         Environment: using revision 1038521
            Reporter: Bernhard Reutner-Fischer
            Priority: Critical

I want to createDocument and store a "Document description".
And i want to retrieve that description.

There is no way i can see to pass in the description.
When i manually set a description for a document in the underlying CMS then i cannot access
that description anywhere in the properties!
The only spot where that description show up in the retrieved document is in it's XML-representation,
as "<summary>" field, which is really, really inconvenient :)

So, both storing as well as retrieving the document description would be great to have!
TIA && cheers,

Gory details:
The creation looks something like this, for reference:
        upload_form = DocumentUploadForm(request.POST, request.FILES)
        if request.POST.get(u'add_document') and upload_form.is_valid():
            # we now have a django.core.files.uploadedfile.InMemoryUploadedFile
            # Note: major takes a string, not a bool! # FIXME!
            checkin_props = {u'major' : u'major_change' in request.POST and 'true' or 'false',
                             u'properties' : {u'cmis:description' : request.POST.get(u'document_description')}
            ret = create(request, path, request.FILES['document'], auto_revision=True, checkin_props)

def create(request, foldername, filename, auto_revision=False, checkin_props={}):
    repo = alf_Client(request, foldername + u'/' +
    checkinComment, doc_props = (None, None)
    if u'checkinComment' in checkin_props:
        checkinComment = checkin_props.pop(u'checkinComment')

    if u'properties' in checkin_props:
        doc_props = checkin_props.pop(u'properties')
    if auto_revision:
            old = repo.fetch_path(unicode(foldername + u'/' +
        except cmislib.exceptions.ObjectNotFoundException:
            pass # just create a new one
            # create new revision. Omitted for brevity
    alf_dir_rs, err = repo.fetch(foldername)
    if err:
        return err'rb')
        doc = alf_dir_rs.createDocument(,
        # handler omitted for brevity

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message