Your message dated Mon, 01 Feb 2010 19:18:46 +0000
with message-id <[email protected]>
and subject line Bug#562615: fixed in luma 2.4-3
has caused the Debian Bug report #562615,
regarding luma: allow displaying user-defined attributes in browser plugin
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
562615: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562615
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: luma
Version: 2.4-2
Severity: wishlist
Tags: patch

Hi,

the luma 2.4-2 Browser plugin derives the attrbrutes to be shown in the search
result list from the attributes used in the filter.

This is sometimes a bit pointless as one often shows the values used in the 
filter
[e.g. with the filter "(sn=Marschall)", the value of the sn attribute gets 
shown,
which always contains at least the value "Marschall"]

The attached patch tries to be a bit more flexible:
It adds an "Attributes:" input box that allows entering attribute names, 
separated
by space or comma and dispalys these attributes instead of the ones from the 
filter.
If the "Attributes" input field is empty, the original behaviour is used.

Thanks for maintaining luma in Debian
Peter


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages luma depends on:
ii  python                        2.5.4-4    An interactive high-level object-o
ii  python-ldap                   2.3.10-1   LDAP interface module for Python
ii  python-qt3                    3.18.1-2   Qt3 bindings for Python
ii  python-support                1.0.6      automated rebuilding support for P

luma recommends no packages.

luma suggests no packages.

-- no debconf information
#! /bin/sh /usr/share/dpatch/dpatch-run
## luma-2.4-search.patch
## DP: allow searching with attributes
# From: Peter Marschall <[email protected]>
# Subject: allow searching with attributes


--- luma-2.4/lib/luma/base/backend/SmartDataObject.py
+++ luma-2.4/lib/luma/base/backend/SmartDataObject.py
@@ -33,17 +33,19 @@ class SmartDataObject (object):
         self.doSchemaChecks = True
         self.isValid = False
         self.checkErrorMessageList = ["No error checking done yet."]
+        self.attributeMap = {}
         
         self.dn = data[0]
         self.data = data[1]
         
         # This is the string representing our key for the objectclasses.
         # Important for lower- and uppercase variants
+        # also add a map for lowercase attribute names to real ones
         self.objectClassName = None
         for x in self.data.keys():
+                self.attributeMap[x.lower()] = x
                 if "objectclass" == x.lower():
                     self.objectClassName = x
-                    break
         
         # Set server meta information
         self.serverMeta = serverMeta
@@ -170,6 +172,8 @@ class SmartDataObject (object):
         if None == attributeName:
             raise FunctionArgumentException("Function getAttributeValueList( attributeName ) called without a parameter.")
             
+        attributeName = self.attributeMap[attributeName.lower()]
+
         if self.data.has_key(attributeName):
             # Binary values are returned normally.
             # String values have to be decoded from utf-8 to unicode.
@@ -195,7 +199,8 @@ class SmartDataObject (object):
         if (None == attributeName) or (None == valueIndex):
             raise FunctionArgumentException("Function getAttributeValue( attributeName, valueIndex ) called without correct parameters.")
             
-            
+        attributeName = self.attributeMap[attributeName.lower()]
+
         if self.data.has_key(attributeName):
             # Is the data length of the attribute compatible with the given index?
             if valueIndex < len(self.data[attributeName]):
@@ -238,6 +243,8 @@ class SmartDataObject (object):
         if None == attributeName:
             raise FunctionArgumentException("Function  addAttributeValue( attributeName, valueList) called without correct parameters.")
          
+        attributeName = self.attributeMap[attributeName.lower()]
+
         # Do we work on an existing attribute?
         if self.data.has_key(attributeName):
             
@@ -359,6 +366,8 @@ class SmartDataObject (object):
         if (None == attributeName) or (None == valueIndex) or (None == newValue):
             raise FunctionArgumentException("Function setAttributeValue( attributeName, valueIndex, newValue ) called without correct parameters.")
             
+        attributeName = self.attributeMap[attributeName.lower()]
+
         if self.data.has_key(attributeName):
             # Is the data length of the attribute compatible with the given index?
             if valueIndex < len(self.data[attributeName]):
--- luma-2.4/lib/luma/base/utils/gui/SearchForm.py
+++ luma-2.4/lib/luma/base/utils/gui/SearchForm.py
@@ -144,11 +144,16 @@ class SearchForm(SearchFormDesign):
 ###############################################################################
 
     def getSearchCriteria(self):
-        filterString = unicode(self.searchEdit.currentText()).encode('utf-8')
-        filterPattern = re.compile("\(\w*=")
-        tmpList = filterPattern.findall(filterString)
-
-        return map(lambda x: x[1:-1], tmpList)
+        attributeString = unicode(self.attributeEdit.currentText()).encode('utf-8')
+        if attributeString:
+            attributeString = attributeString.replace(",", " ")
+            return attributeString.split()
+        else:
+            filterPattern = re.compile("\(\w*=")
+            filterString = unicode(self.searchEdit.currentText()).encode('utf-8')
+            filterPattern = re.compile("\(\w*=")
+            tmpList = filterPattern.findall(filterString)
+            return map(lambda x: x[1:-1], tmpList)
 
 ###############################################################################
 
--- luma-2.4/lib/luma/base/utils/gui/SearchResultView.py
+++ luma-2.4/lib/luma/base/utils/gui/SearchResultView.py
@@ -30,7 +30,6 @@ from base.utils import getSortedDnList
 
 
 
-
 class SearchResultView(SearchResultViewDesign):
 
     def __init__(self, parent=None, name=None, fl=0):
@@ -145,7 +144,7 @@ class SearchResultView(SearchResultViewD
         
         while self.resultListView.columns():
             self.resultListView.removeColumn(0)
-            
+
         self.FILTER_COLUMN_POS = {}
         position = self.resultListView.addColumn("dn")
         self.FILTER_COLUMN_POS["dn"] = position
@@ -179,6 +178,7 @@ class SearchResultView(SearchResultViewD
             self.resultListView.insertItem(listItem)
             
         self.resultListView.setColumnWidth(0, 250)
+        self.resultListView.setResizeMode(QListView.AllColumns)
         self.resultListView.triggerUpdate()
 
 
--- luma-2.4/lib/luma/base/utils/gui/SearchFormDesign.ui
+++ luma-2.4/lib/luma/base/utils/gui/SearchFormDesign.ui
@@ -98,6 +98,22 @@
                         <bool>true</bool>
                     </property>
                 </widget>
+                <widget class="QComboBox" row="2" column="1" rowspan="1" colspan="4">
+                    <property name="name">
+                        <cstring>attributeEdit</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>7</hsizetype>
+                            <vsizetype>0</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="editable">
+                        <bool>true</bool>
+                    </property>
+                </widget>
                 <widget class="QLabel" row="0" column="2">
                     <property name="name">
                         <cstring>textLabel1</cstring>
@@ -135,6 +151,22 @@
                         <string>Filter:</string>
                     </property>
                 </widget>
+                <widget class="QLabel" row="2" column="0">
+                    <property name="name">
+                        <cstring>textLabel7</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>0</hsizetype>
+                            <vsizetype>5</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="text">
+                        <string>Attributes:</string>
+                    </property>
+                </widget>
                 <widget class="QLabel" row="0" column="0">
                     <property name="name">
                         <cstring>textLabel2</cstring>
@@ -203,8 +235,9 @@
 <tabstops>
     <tabstop>serverBox</tabstop>
     <tabstop>baseBox</tabstop>
-    <tabstop>searchEdit</tabstop>
     <tabstop>filterWizardButton</tabstop>
+    <tabstop>searchEdit</tabstop>
+    <tabstop>attributeEdit</tabstop>
     <tabstop>startButton</tabstop>
 </tabstops>
 <slots>
--- luma-2.4/lib/luma/base/utils/gui/SearchFormDesign.py
+++ luma-2.4/lib/luma/base/utils/gui/SearchFormDesign.py
@@ -44,6 +44,12 @@
 
         groupFrameLayout.addMultiCellWidget(self.searchEdit,1,1,1,4)
 
+        self.attributeEdit = QComboBox(0,self.groupFrame,"attributeEdit")
+        self.attributeEdit.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.attributeEdit.sizePolicy().hasHeightForWidth()))
+        self.attributeEdit.setEditable(1)
+
+        groupFrameLayout.addMultiCellWidget(self.attributeEdit,2,2,1,4)
+
         self.textLabel1 = QLabel(self.groupFrame,"textLabel1")
         self.textLabel1.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Preferred,0,0,self.textLabel1.sizePolicy().hasHeightForWidth()))
 
@@ -58,6 +64,11 @@
 
         groupFrameLayout.addWidget(self.textLabel6,1,0)
 
+        self.textLabel7 = QLabel(self.groupFrame,"textLabel7")
+        self.textLabel7.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Preferred,0,0,self.textLabel7.sizePolicy().hasHeightForWidth()))
+
+        groupFrameLayout.addWidget(self.textLabel7,2,0)
+
         self.textLabel2 = QLabel(self.groupFrame,"textLabel2")
         self.textLabel2.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Preferred,0,0,self.textLabel2.sizePolicy().hasHeightForWidth()))
 
@@ -81,9 +92,10 @@
         self.connect(self.serverBox,SIGNAL("activated(const QString&)"),self.serverChanged)
 
         self.setTabOrder(self.serverBox,self.baseBox)
-        self.setTabOrder(self.baseBox,self.searchEdit)
-        self.setTabOrder(self.searchEdit,self.filterWizardButton)
-        self.setTabOrder(self.filterWizardButton,self.startButton)
+        self.setTabOrder(self.baseBox,self.filterWizardButton)
+        self.setTabOrder(self.filterWizardButton,self.searchEdit)
+        self.setTabOrder(self.searchEdit,self.attributeEdit)
+        self.setTabOrder(self.attributeEdit,self.startButton)
 
 
     def languageChange(self):
@@ -92,6 +104,7 @@
         self.filterWizardButton.setAccel(self.__tr("Alt+F"))
         self.textLabel1.setText(self.__tr("Base DN:"))
         self.textLabel6.setText(self.__tr("Filter:"))
+        self.textLabel7.setText(self.__tr("Attributes:"))
         self.textLabel2.setText(self.__tr("Server:"))
         self.startButton.setText(self.__tr("&Search"))
         self.startButton.setAccel(self.__tr("Alt+S"))

--- End Message ---
--- Begin Message ---
Source: luma
Source-Version: 2.4-3

We believe that the bug you reported is fixed in the latest version of
luma, which is due to be installed in the Debian FTP archive:

luma_2.4-3.debian.tar.gz
  to main/l/luma/luma_2.4-3.debian.tar.gz
luma_2.4-3.dsc
  to main/l/luma/luma_2.4-3.dsc
luma_2.4-3_all.deb
  to main/l/luma/luma_2.4-3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Per Wawra <[email protected]> (supplier of updated luma package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 19 Jan 2010 00:00:00 +0100
Source: luma
Binary: luma
Architecture: source all
Version: 2.4-3
Distribution: unstable
Urgency: low
Maintainer: Per Wawra <[email protected]>
Changed-By: Per Wawra <[email protected]>
Description: 
 luma       - gui utility for accessing and managing LDAP database
Closes: 562612 562614 562615
Changes: 
 luma (2.4-3) unstable; urgency=low
 .
   [ Peter Marschall ]
   * Patch added: Make addressbook readable. Closes: #562612
   * Patch added: Fix errors in schema viewer. Closes: #562614
   * Patch added: Improve search. Closes: #562615
 .
   [ Per Wawra ]
   * New maintainer
   * Switched to dpkg-source 3.0 (quilt) format
   * Switched patch system from dpatch to quilt
   * Updated all patches with DEP-3 compliant headers
   * Removed Build-Depends dpatch,
     because the package uses quilt now.
   * Removed Build-Depends-Indep python-dev,
     because it is only needed for arch-any packages.
   * Removed Build-Depends-Indep python-qt3 and python-ldap,
     because they are needed for running not for building.
   * Created a upstream changelog, since upstream does not include it
     in the source but on the webpage.
   * Removed Qt-Designer *.ui-Files from binary,
     because upstream already generated *.py files with pyuic.
Checksums-Sha1: 
 b336f543a154a87d3d9d99a2cc23c7de635b9766 1135 luma_2.4-3.dsc
 8cb620b916466cce0430173bd4e02ef8c2564c90 15849 luma_2.4-3.debian.tar.gz
 d2ca50146ca723457dd119cf60c3845df1bab0b6 678988 luma_2.4-3_all.deb
Checksums-Sha256: 
 7622250d527166f4559cdc3985305a6e6d3a7e8e51c752a14c5e7fe30132647f 1135 
luma_2.4-3.dsc
 4902b222697541937c2cba385a22e9363c4fb25820c9b3b506b390211e0fea4e 15849 
luma_2.4-3.debian.tar.gz
 a57a7050e490ddb58f03355a492703f12c227c3cf6bc1d8b732de5558dd759a4 678988 
luma_2.4-3_all.deb
Files: 
 ac800cdca0ee7f011d4d9675e1a1d9b6 1135 utils extra luma_2.4-3.dsc
 48226d2e24fe7d70865aff21b2eb08ba 15849 utils extra luma_2.4-3.debian.tar.gz
 67682a098c5bb2987f7de7fa0a2dfc40 678988 utils extra luma_2.4-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAktnKCYACgkQvQmfopLcAqk5sACdE1zjMSaLTuh1P4a259Q35GKK
pRsAn2BAZPwR8nqllRj0SRKzbmbIWDgW
=o88o
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to