http://bugs.kde.org/show_bug.cgi?id=176654
Summary: Buttons for setting album date in album properties not working Product: digikam Version: 0.10.0-svn Platform: Ubuntu Packages OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general AssignedTo: [hidden email] ReportedBy: [hidden email] Version: 0.10.0-svn (using KDE 4.1.3) Compiler: gcc 4.3.2 cmake 2.6 OS: Linux Installed from: Ubuntu Packages When clicking the Oldest or Newest buttons does nothing and clicking Average gives a error message. I look in the code and it looks like these functions use the old 0.9 database schema. Here is a possible patch to solve the problem: Index: digikam/libs/database/albumdb.cpp =================================================================== --- digikam/libs/database/albumdb.cpp (revision 891372) +++ digikam/libs/database/albumdb.cpp (working copy) @@ -2700,8 +2700,9 @@ QDate AlbumDB::getAlbumLowestDate(int albumID) { QList<QVariant> values; - d->db->execSql( QString("SELECT MIN(datetime) FROM Images " - "WHERE album=? GROUP BY album"), + d->db->execSql( "SELECT MIN(creationDate) FROM ImageInformation " + " LEFT JOIN Images ON Images.id=ImageInformation.imageid " + " WHERE Images.album=? GROUP BY Images.album;", albumID, &values ); if (!values.isEmpty()) return QDate::fromString( values.first().toString(), Qt::ISODate ); @@ -2712,8 +2713,9 @@ QDate AlbumDB::getAlbumHighestDate(int albumID) { QList<QVariant> values; - d->db->execSql( QString("SELECT MAX(datetime) FROM Images " - "WHERE album=? GROUP BY album"), + d->db->execSql( "SELECT MAX(creationDate) FROM ImageInformation " + " LEFT JOIN Images ON Images.id=ImageInformation.imageid " + " WHERE Images.album=? GROUP BY Images.album;", albumID , &values ); if (!values.isEmpty()) return QDate::fromString( values.first().toString(), Qt::ISODate ); @@ -2724,7 +2726,9 @@ QDate AlbumDB::getAlbumAverageDate(int albumID) { QList<QVariant> values; - d->db->execSql( QString("SELECT datetime FROM Images WHERE album=?"), + d->db->execSql( "SELECT creationDate FROM ImageInformation " + " LEFT JOIN Images ON Images.id=ImageInformation.imageid " + " WHERE Images.album=?;", albumID , &values); int differenceInSecs = 0; -- Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
http://bugs.kde.org/show_bug.cgi?id=176654
Gilles Caulier caulier gilles gmail com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[hidden email] Component|general |Database --- Comment #1 from Gilles Caulier <caulier gilles gmail com> 2008-12-02 06:37:46 --- David, Thanks for the patch... Marcel, This entry is for you (:=))) Gilles Caulier -- Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from meldavid@acc.umu.se
http://bugs.kde.org/show_bug.cgi?id=176654
--- Comment #2 from Marcel Wiesweg <marcel wiesweg gmx de> 2008-12-02 14:42:10 --- SVN commit 891625 by mwiesweg: Patch from David Eriksson: Fix SQL CCBUG: 176654 M +9 -5 albumdb.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=891625 -- Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from meldavid@acc.umu.se
http://bugs.kde.org/show_bug.cgi?id=176654
Marcel Wiesweg marcel wiesweg gmx de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #3 from Marcel Wiesweg <marcel wiesweg gmx de> 2008-12-02 14:43:45 --- David, thank you for your help! -- Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from meldavid@acc.umu.se
https://bugs.kde.org/show_bug.cgi?id=176654
Gilles Caulier <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|0.10.0-svn |0.10.0 -- Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by Bugzilla from meldavid@acc.umu.se
https://bugs.kde.org/show_bug.cgi?id=176654
[hidden email] changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Database |Database-Albums -- You are receiving this mail because: You are the assignee for the bug. |
Free forum by Nabble | Edit this page |