Bug 45057 - kbugbuster should display age of bug
Summary: kbugbuster should display age of bug
Status: RESOLVED FIXED
Alias: None
Product: kbugbuster
Classification: Applications
Component: general (show other bugs)
Version: 3.0.2
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Martijn Klingens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-12 11:48 UTC by Stefan Kebekus
Modified: 2004-01-31 18:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
GUI for showing the age of bug reports (2.51 KB, patch)
2003-12-06 18:16 UTC, Martijn Klingens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Kebekus 2002-07-12 11:40:18 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kbugbuster
Version:           3.0.2 (using KDE 3.0.2 )
Severity:          wishlist
Installed from:    compiled sources
Compiler:          gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.63.1mdk)
OS:                Linux (i686) release 2.4.8-26mdksmp
OS/Compiler notes: 

It would be very nice of kbugbuster would not only display number/title/... of the bug but also the age of the bug report.

Greetings

Stefan Kebekus

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Frerich Raabe 2003-03-15 13:59:04 UTC
Do you mean it should show the age of the bug report in the list in the upper half of the 
window? If so, that is hardly possible since it would require retrieving the details for all bug 
reports. The date and time when a bug report was received are part of it's details. 
 
If you mean it should show it in the lower half - well, it does so, at least in KDE 3.1. 
Comment 2 Christian Loose 2003-03-18 11:03:01 UTC
I think, it would be useful to have the bug age in the report list (upper 
half). It should be possible 'cause the query http://bugs.kde.org/xmlquery.cgi 
contains AFAIK the creation date of the bug.

Christian
Comment 3 Martijn Klingens 2003-12-06 18:13:38 UTC
Subject: kdesdk/kbugbuster/backend

CVS commit by mklingens: 

Backend support for getting the age of a bug report (in days).

The GUI part will be attached to the bug report as it introduces new strings,
but with this part already in it helps to keep the diff of the uncommitted
part small :)

Reviewed by Scott Wheeler.

CCMAIL: 45057@bugs.kde.org


  M +15 -1     bug.cpp   1.20
  M +4 -1      bug.h   1.18
  M +3 -1      bugcache.cpp   1.27
  M +2 -1      bugimpl.h   1.10
  M +4 -1      domprocessor.cpp   1.18
  M +1 -1      htmlparser.cpp   1.4
  M +1 -1      rdfprocessor.cpp   1.8



Comment 4 Martijn Klingens 2003-12-06 18:16:12 UTC
Created attachment 3581 [details]
GUI for showing the age of bug reports

Given the string freeze for KDE 3.2 I can't commit this, but the attached patch
implements your wish.

After KDE 3.2 is out and CVS is open again someone should commit this and close
the report :)

Patch already reviewed by Scott Wheeler, though it's a trivial one anyway.

Martijn
Comment 5 Martijn Klingens 2004-01-31 18:04:17 UTC
Subject: kdesdk/kbugbuster/gui

CVS commit by mklingens: 

Show the age of bug reports.

The backend part was already in, but the GUI had to wait until the end of
the string freeze.

CCMAIL: 45057-done@bugs.kde.org


  M +13 -2     buglvi.cpp   1.16
  M +1 -0      cwbuglistcontainer.cpp   1.30


--- kdesdk/kbugbuster/gui/buglvi.cpp  #1.15:1.16
@@ -30,4 +30,5 @@ using namespace KBugBusterMainWindow;
 BugLVI::BugLVI( KListView *parent , const Bug &bug )
 : KListViewItem( parent, bug.number() + "  ",
+                 i18n( "One day", "%n days", bug.age() ),
                  bug.title(), //KStringHandler::csqueeze( bug.title(), 70 ),
                  Bug::statusLabel( bug.status() ),
@@ -40,7 +41,10 @@ BugLVI::BugLVI( KListView *parent , cons
     mCommandState = hasCommands ? BugCommand::Queued : BugCommand::None;
 
+    if ( bug.age() == 0xFFFFFFFF )
+        setText( 1, i18n( "Unknown" ) );
+
     Person developer = bug.developerTODO();
     if ( !developer.name.isEmpty() )
-        setText( 2, Bug::statusLabel( bug.status() ) + " (" + developer.name + ")" );
+        setText( 3, i18n( "%1 (%2)" ).arg( Bug::statusLabel( bug.status() ), developer.name ) );
 }
 
@@ -57,5 +61,12 @@ QString BugLVI::key( int column, bool /*
         key = text( 0 ).rightJustify( 10, '0' );
     }
-    else if ( column == 3 )
+    else if ( column == 1 )
+    {
+        if ( m_bug.age() == 0xFFFFFFFF )
+            key = "0";
+        else
+            key = QString::number( m_bug.age() ).rightJustify( 10, '0' );
+    }
+    else if ( column == 4 )
     {
         key = QString::number( 10 - m_bug.severity() );

--- kdesdk/kbugbuster/gui/cwbuglistcontainer.cpp  #1.29:1.30
@@ -61,4 +61,5 @@ CWBugListContainer::CWBugListContainer( 
     m_listBugs = new KListView( m_listStack );
     m_listBugs->addColumn( i18n( "Number" ) );
+    m_listBugs->addColumn( i18n( "Age" ) );
     m_listBugs->addColumn( i18n( "Title" ), 500 ); // so that the widthmode isn't "Maximum"
     m_listBugs->addColumn( i18n( "Status" ) );