From metatracker at psf.upfronthosting.co.za Wed Aug 3 20:07:52 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 03 Aug 2011 18:07:52 +0000 Subject: [Tracker-discuss] [issue134] Exception viewing issue with superseder - should superseder be Link or Multilink In-Reply-To: <1187893000.91.0.555834863275.issue134@psf.upfronthosting.co.za> Message-ID: <1312394872.53.0.949472564539.issue134@psf.upfronthosting.co.za> Ezio Melotti added the comment: I agree with Georg, so I'll close this. ---------- assignedto: -> ezio.melotti nosy: +ezio.melotti status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Aug 3 20:13:06 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 03 Aug 2011 18:13:06 +0000 Subject: [Tracker-discuss] [issue324] Add repository info to tracker components In-Reply-To: <1269343030.93.0.79046519877.issue324@psf.upfronthosting.co.za> Message-ID: <1312395186.56.0.0317026354246.issue324@psf.upfronthosting.co.za> Ezio Melotti added the comment: I agree that adding the links to the tracker clutters the UI. Now that we have the devguide and better autolinking (including from the tracebacks, so that you can jump directly to the file/line where the error is) I don't think this will bring anything useful. ---------- assignedto: -> ezio.melotti status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Aug 6 16:37:06 2011 From: metatracker at psf.upfronthosting.co.za (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Aug 2011 14:37:06 +0000 Subject: [Tracker-discuss] [issue394] Better integration with Rietveld code review tool In-Reply-To: <1303156350.85.0.792534425783.issue394@psf.upfronthosting.co.za> Message-ID: <1312641426.13.0.797088585026.issue394@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ezio added the backlink from Rietveld to Roundup in r88874 \o/ _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Aug 6 16:48:18 2011 From: metatracker at psf.upfronthosting.co.za (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Aug 2011 14:48:18 +0000 Subject: [Tracker-discuss] [issue413] Mercurial integration: impossible to remove a repo Message-ID: <1312642098.58.0.714079362013.issue413@psf.upfronthosting.co.za> New submission from ?ric Araujo : When I try to remove the second repo on http://bugs.python.org/issue12666, I get this cryptic error: property "files": "51" not currently in list ---------- messages: 2205 nosy: eric.araujo, loewis priority: bug status: unread title: Mercurial integration: impossible to remove a repo _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Aug 6 16:52:13 2011 From: metatracker at psf.upfronthosting.co.za (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Aug 2011 14:52:13 +0000 Subject: [Tracker-discuss] [issue414] Mercurial integration: verify repo when adding Message-ID: <1312642333.95.0.845747072773.issue414@psf.upfronthosting.co.za> New submission from ?ric Araujo : It has happened more than one time that people put an ssh or private https URI in the remote repo field, which makes Roundup error when someone wants to create a patch. If possible, access should be checked when a repo is added. (FTR, the Bitbucket https URIs are not private, this may be yet another bug.) ---------- messages: 2206 nosy: eric.araujo, loewis priority: bug status: unread title: Mercurial integration: verify repo when adding _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Aug 6 16:55:12 2011 From: metatracker at psf.upfronthosting.co.za (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Aug 2011 14:55:12 +0000 Subject: [Tracker-discuss] [issue415] Mercurial integration: regression in diff generation Message-ID: <1312642512.39.0.425778233696.issue415@psf.upfronthosting.co.za> New submission from ?ric Araujo : There seems to be a regression with diff generation: if you look at http://bugs.python.org/file22839/bc362109eed8.diff (created from the repo http://bitbucket.org/jaraco/cpython-issue12666 added to http://bugs.python.org/issue12666), you?ll find first that the diff uses the old format, not the git format, and second that the diff seems to revert some upstream changes. ---------- messages: 2207 nosy: eric.araujo, loewis, pitrou priority: urgent status: unread title: Mercurial integration: regression in diff generation _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Aug 9 01:12:56 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 08 Aug 2011 23:12:56 +0000 Subject: [Tracker-discuss] [issue278] 1.4.8 fixes for other PSF trackers In-Reply-To: <1240793302.05.0.121079776163.issue278@psf.upfronthosting.co.za> Message-ID: <1312845176.31.0.0584170374752.issue278@psf.upfronthosting.co.za> Ezio Melotti added the comment: I applied the patch in r88878. ---------- assignedto: -> ezio.melotti status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Aug 9 01:29:34 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 08 Aug 2011 23:29:34 +0000 Subject: [Tracker-discuss] [issue409] Spam on jython tracker. In-Reply-To: <1310843975.4.0.271262889404.issue409@psf.upfronthosting.co.za> Message-ID: <1312846174.54.0.112797949348.issue409@psf.upfronthosting.co.za> Ezio Melotti added the comment: The problem with the files was that it required a POST request while the remove button was trying to use GET. This is now fixed in r88878 in both the Jython and meta trackers, so you can remove files and messages from the issues. OTOH I still haven't figured out how to retire those issue/messages/files. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Aug 9 05:24:44 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Tue, 09 Aug 2011 03:24:44 +0000 Subject: [Tracker-discuss] [issue411] Roundup instance is outdated In-Reply-To: <1311602492.71.0.972062932119.issue411@psf.upfronthosting.co.za> Message-ID: <1312860284.57.0.952825554549.issue411@psf.upfronthosting.co.za> Ezio Melotti added the comment: I applied the update to Roundup 1.4.19 in r88872, to the python-dev instance in r88876/7, and updated the other instances to Roundup 1.4.8. The attached patch contains the 1.4.19 updates for the other instances as well. It might be necessary to apply the r88877 fix[0] to them as well. FWIW I can't tests this instances on my machine. Also I didn't include the python-dev-spambayes-integration instance in the update. Is it used? Does it need to be updated? The updated instances are: board, jobs, jython, meta, security, setuptools. _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- Index: setuptools/html/style.css =================================================================== --- setuptools/html/style.css (revision 88877) +++ setuptools/html/style.css (working copy) @@ -50,15 +50,7 @@ padding: 5px; border-bottom: 1px solid #444; } -#searchbox { - float: right; -} -div#body-title { - float: left; -} - - div#searchbox { float: right; padding-top: 1em; @@ -421,6 +413,7 @@ font-weight: bold; text-align: left; } + input[type="text"]:focus, input[type="checkbox"]:focus, input[type="radio"]:focus, @@ -429,6 +422,18 @@ background-color: #ffffc0; } +.calendar_display { + text-align: center; +} + +.calendar_display td { + padding: 1px 4px 1px 4px; +} + +.calendar_display .today { + background-color: #afafaf; +} + /* vim: sts=2 sw=2 et */ /* SHA: 7243da9b4e481a0b95a5367b45baaaa45fab8998 */ Index: setuptools/html/page.html =================================================================== --- setuptools/html/page.html (revision 88877) +++ setuptools/html/page.html (working copy) @@ -28,9 +28,6 @@   -
-

body title

-
+ +
+

body title

+
@@ -164,7 +164,7 @@

Help
- Roundup docs

@@ -231,7 +231,7 @@ - @@ -247,6 +247,22 @@ + +
+ + (expr) +
+ + Index: setuptools/html/_generic.index.html =================================================================== --- setuptools/html/_generic.index.html (revision 88877) +++ setuptools/html/_generic.index.html (working copy) @@ -39,7 +39,8 @@

Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

@@ -54,7 +55,7 @@ db_klass string:keyword; db_content string:name;"> Keyword: - + @@ -167,8 +168,8 @@ No Sort or group:     - - + + Index: setuptools/html/_generic.item.html =================================================================== --- setuptools/html/_generic.item.html (revision 88877) +++ setuptools/html/_generic.item.html (working copy) @@ -44,7 +44,12 @@
- + +

Showing 10 items. +Show all history +(warning: this could be VERY long)

Index: meta/html/style.css =================================================================== --- meta/html/style.css (revision 88878) +++ meta/html/style.css (working copy) @@ -50,15 +50,7 @@ padding: 5px; border-bottom: 1px solid #444; } -#searchbox { - float: right; -} -div#body-title { - float: left; -} - - div#searchbox { float: right; padding-top: 1em; @@ -431,6 +423,7 @@ font-weight: bold; text-align: left; } + input[type="text"]:focus, input[type="checkbox"]:focus, input[type="radio"]:focus, @@ -440,6 +433,18 @@ background-color: #ffffc0; } +.calendar_display { + text-align: center; +} + +.calendar_display td { + padding: 1px 4px 1px 4px; +} + +.calendar_display .today { + background-color: #afafaf; +} + /* vim: sts=2 sw=2 et */ /* SHA: 7243da9b4e481a0b95a5367b45baaaa45fab8998 */ Index: meta/html/page.html =================================================================== --- meta/html/page.html (revision 88878) +++ meta/html/page.html (working copy) @@ -28,9 +28,6 @@   -
-

body title

-
+ +
+

body title

+
@@ -162,7 +162,7 @@

Help
- Roundup docs

@@ -229,7 +229,7 @@ - @@ -245,6 +245,22 @@ + +
+ + (expr) +
+ + Index: meta/html/_generic.index.html =================================================================== --- meta/html/_generic.index.html (revision 88878) +++ meta/html/_generic.index.html (working copy) @@ -39,7 +39,8 @@

Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

- + No Sort or group: - - + + Index: meta/html/_generic.item.html =================================================================== --- meta/html/_generic.item.html (revision 88878) +++ meta/html/_generic.item.html (working copy) @@ -44,7 +44,12 @@ - + +

Showing 10 items. +Show all history +(warning: this could be VERY long)

Index: board/html/style.css =================================================================== --- board/html/style.css (revision 88877) +++ board/html/style.css (working copy) @@ -33,13 +33,6 @@ #searchbox { display: none;} } -#searchbox { float: right;} - -div#body-title { - float: left; -} - - div#searchbox { float: right; @@ -456,7 +449,18 @@ background-color: #ffffc0; } +.calendar_display { + text-align: center; +} +.calendar_display td { + padding: 1px 4px 1px 4px; +} + +.calendar_display .today { + background-color: #afafaf; +} + #demowarning { position: absolute; top: 10px; Index: board/html/page.html =================================================================== --- board/html/page.html (revision 88877) +++ board/html/page.html (working copy) @@ -130,7 +130,7 @@
  • Register
  • Lost your login? @@ -283,7 +283,7 @@ - @@ -299,6 +299,22 @@ +
  • + Index: board/html/_generic.index.html =================================================================== --- board/html/_generic.index.html (revision 88877) +++ board/html/_generic.index.html (working copy) @@ -37,7 +37,8 @@

    Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

    @@ -191,7 +192,7 @@ db_klass string:keyword; db_content string:name;"> - @@ -244,8 +245,8 @@ - - + + Index: board/html/_generic.item.html =================================================================== --- board/html/_generic.item.html (revision 88877) +++ board/html/_generic.item.html (working copy) @@ -44,7 +44,12 @@ - + +

    Showing 10 items. +Show all history +(warning: this could be VERY long)

    Index: board/schema.py =================================================================== --- board/schema.py (revision 88877) +++ board/schema.py (working copy) @@ -80,6 +80,8 @@ roles=String(), # comma-separated string of Role names timezone=String()) user.setkey("username") +db.security.addPermission(name='Register', klass='user', + description='User is allowed to register new user') # FileClass automatically gets this property in addition to the Class ones: # content = String() [saved to disk in /db/files/] @@ -287,6 +289,9 @@ description="User is allowed to view their own and public queries") for r in 'User', 'Board', 'Coordinator': db.security.addPermissionToRole(r, p) +p = db.security.addPermission(name='Search', klass='query') +for r in 'User', 'Board', 'Coordinator': + db.security.addPermissionToRole(r, p) p = db.security.addPermission(name='Edit', klass='query', check=edit_query, description="User is allowed to edit their queries") for r in 'User', 'Board', 'Coordinator': @@ -315,7 +320,7 @@ # Assign the appropriate permissions to the anonymous user's Anonymous # Role. Choices here are: # - Allow anonymous users to register -#db.security.addPermissionToRole('Anonymous', 'Create', 'user') +#db.security.addPermissionToRole('Anonymous', 'Register', 'user') # Allow anonymous users access to view issues (and the related, linked # information). Index: security/html/style.css =================================================================== --- security/html/style.css (revision 88877) +++ security/html/style.css (working copy) @@ -33,13 +33,6 @@ #searchbox { display: none;} } -#searchbox { float: right;} - -div#body-title { - float: left; -} - - div#searchbox { float: right; @@ -456,7 +449,18 @@ background-color: #ffffc0; } +.calendar_display { + text-align: center; +} +.calendar_display td { + padding: 1px 4px 1px 4px; +} + +.calendar_display .today { + background-color: #afafaf; +} + #demowarning { position: absolute; top: 10px; Index: security/html/page.html =================================================================== --- security/html/page.html (revision 88877) +++ security/html/page.html (working copy) @@ -130,7 +130,7 @@
  • Register
  • Lost your login? @@ -283,7 +283,7 @@ - @@ -299,6 +299,22 @@ +
  • + Index: security/html/_generic.index.html =================================================================== --- security/html/_generic.index.html (revision 88877) +++ security/html/_generic.index.html (working copy) @@ -37,7 +37,8 @@

    Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

    @@ -191,7 +192,7 @@ db_klass string:keyword; db_content string:name;"> - @@ -244,8 +245,8 @@ - - + + Index: security/html/_generic.item.html =================================================================== --- security/html/_generic.item.html (revision 88877) +++ security/html/_generic.item.html (working copy) @@ -44,7 +44,12 @@ - + +

    Showing 10 items. +Show all history +(warning: this could be VERY long)

    Index: security/schema.py =================================================================== --- security/schema.py (revision 88877) +++ security/schema.py (working copy) @@ -87,6 +87,8 @@ roles=String(), # comma-separated string of Role names timezone=String()) user.setkey("username") +db.security.addPermission(name='Register', klass='user', + description='User is allowed to register new user') # FileClass automatically gets this property in addition to the Class ones: # content = String() [saved to disk in /db/files/] @@ -299,6 +301,9 @@ description="User is allowed to view their own and public queries") for r in 'User', 'Developer', 'Coordinator': db.security.addPermissionToRole(r, p) +p = db.security.addPermission(name='Search', klass='query') +for r in 'User', 'Developer', 'Coordinator': + db.security.addPermissionToRole(r, p) p = db.security.addPermission(name='Edit', klass='query', check=edit_query, description="User is allowed to edit their queries") for r in 'User', 'Developer', 'Coordinator': @@ -327,7 +332,7 @@ # Assign the appropriate permissions to the anonymous user's Anonymous # Role. Choices here are: # - Allow anonymous users to register -#db.security.addPermissionToRole('Anonymous', 'Create', 'user') +#db.security.addPermissionToRole('Anonymous', 'Register', 'user') # Allow anonymous users access to view issues (and the related, linked # information). Index: jython/html/style.css =================================================================== --- jython/html/style.css (revision 88877) +++ jython/html/style.css (working copy) @@ -33,13 +33,6 @@ #searchbox { display: none;} } -#searchbox { float: right;} - -div#body-title { - float: left; -} - - div#searchbox { float: right; @@ -453,7 +446,18 @@ background-color: #ffffc0; } +.calendar_display { + text-align: center; +} +.calendar_display td { + padding: 1px 4px 1px 4px; +} + +.calendar_display .today { + background-color: #afafaf; +} + #demowarning { position: absolute; top: 10px; Index: jython/html/page.html =================================================================== --- jython/html/page.html (revision 88877) +++ jython/html/page.html (working copy) @@ -349,7 +349,7 @@ string (eg. "id,title" or "id,name,description") as well as name --> - +
    + Index: jython/html/_generic.index.html =================================================================== --- jython/html/_generic.index.html (revision 88877) +++ jython/html/_generic.index.html (working copy) @@ -37,7 +37,8 @@

    Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

    @@ -191,9 +192,9 @@ db_klass string:keyword; db_content string:name;"> - @@ -244,8 +245,8 @@ - - + + Index: jython/html/_generic.item.html =================================================================== --- jython/html/_generic.item.html (revision 88877) +++ jython/html/_generic.item.html (working copy) @@ -44,7 +44,12 @@ - + +

    Showing 10 items. +Show all history +(warning: this could be VERY long)

    Index: jobs/html/style.css =================================================================== --- jobs/html/style.css (revision 88877) +++ jobs/html/style.css (working copy) @@ -33,13 +33,6 @@ #searchbox { display: none;} } -#searchbox { float: right;} - -div#body-title { - float: left; -} - - div#searchbox { float: right; @@ -452,7 +445,18 @@ background-color: #ffffc0; } +.calendar_display { + text-align: center; +} +.calendar_display td { + padding: 1px 4px 1px 4px; +} + +.calendar_display .today { + background-color: #afafaf; +} + #demowarning { position: absolute; top: 10px; Index: jobs/html/page.html =================================================================== --- jobs/html/page.html (revision 88877) +++ jobs/html/page.html (working copy) @@ -272,7 +272,7 @@ - @@ -288,6 +288,22 @@ +
    + Index: jobs/html/_generic.index.html =================================================================== --- jobs/html/_generic.index.html (revision 88877) +++ jobs/html/_generic.index.html (working copy) @@ -37,7 +37,8 @@

    Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

    No Sort or group: - - + + Index: jobs/html/_generic.item.html =================================================================== --- jobs/html/_generic.item.html (revision 88877) +++ jobs/html/_generic.item.html (working copy) @@ -44,7 +44,12 @@ - + +

    Showing 10 items. +Show all history +(warning: this could be VERY long)

    From metatracker at psf.upfronthosting.co.za Tue Aug 9 05:38:00 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Tue, 09 Aug 2011 03:38:00 +0000 Subject: [Tracker-discuss] [issue413] Mercurial integration: impossible to remove a repo In-Reply-To: <1312642098.58.0.714079362013.issue413@psf.upfronthosting.co.za> Message-ID: <1312861080.52.0.23474428907.issue413@psf.upfronthosting.co.za> Ezio Melotti added the comment: The error seems pretty clear to me :) Should be fixed in r88879. ---------- assignedto: -> ezio.melotti nosy: +ezio.melotti status: unread -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Aug 9 15:50:29 2011 From: metatracker at psf.upfronthosting.co.za (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Aug 2011 13:50:29 +0000 Subject: [Tracker-discuss] [issue413] Mercurial integration: impossible to remove a repo In-Reply-To: <1312642098.58.0.714079362013.issue413@psf.upfronthosting.co.za> Message-ID: <1312897829.69.0.937298196124.issue413@psf.upfronthosting.co.za> ?ric Araujo added the comment: *reads the checkin email* Oh, I see :) Thanks. ---------- status: resolved -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Aug 10 18:10:58 2011 From: metatracker at psf.upfronthosting.co.za (Feth AREZKI) Date: Wed, 10 Aug 2011 16:10:58 +0000 Subject: [Tracker-discuss] [issue416] Show bug status with a nice colour/image Message-ID: <1312992658.94.0.650426627964.issue416@psf.upfronthosting.co.za> New submission from Feth AREZKI : In order to increase legibility on the bugtracker, I would like nice icons to visually signal the status and/or priority of an issue. A smaller version (16x16?) could be displayed in the leftmost column the HTML listing (and we'd keep the written version). A large version (64x64?) could be displayed on the page of the issue. I suggest using stock icons from openclipart or the like, such as: - open: open folder - closed: closed folder - resolved: tick ? Priority could be represented altogether with badges on the large icon: - urgent: clock - important: exclamation mark sign - wish: wand? ? What do you think? ---------- messages: 2213 nosy: feth priority: wish status: unread title: Show bug status with a nice colour/image _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Wed Aug 10 18:25:42 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Wed, 10 Aug 2011 16:25:42 +0000 Subject: [Tracker-discuss] [issue416] Show bug status with a nice colour/image In-Reply-To: <1312992658.94.0.650426627964.issue416@psf.upfronthosting.co.za> Message-ID: <1312993542.16.0.762049366285.issue416@psf.upfronthosting.co.za> Ezio Melotti added the comment: While I agree that icons might be helpful (especially in the search page), I think most of the developers will find them distracting and would rather prefer a simple and clean look without icons and colors. ---------- nosy: +ezio.melotti status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Aug 11 03:18:46 2011 From: metatracker at psf.upfronthosting.co.za (R David Murray) Date: Thu, 11 Aug 2011 01:18:46 +0000 Subject: [Tracker-discuss] [issue416] Show bug status with a nice colour/image In-Reply-To: <1312992658.94.0.650426627964.issue416@psf.upfronthosting.co.za> Message-ID: <1313025526.2.0.350873336647.issue416@psf.upfronthosting.co.za> R David Murray added the comment: Count me as one of those developers who find icons distracting. ---------- nosy: +r.david.murray _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Fri Aug 12 07:04:46 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Fri, 12 Aug 2011 05:04:46 +0000 Subject: [Tracker-discuss] [issue417] Add autocomplete for the nosy list Message-ID: <1313125486.66.0.367655724531.issue417@psf.upfronthosting.co.za> New submission from Ezio Melotti : The attached patch adds an autocomplete to the nosy list. TL;DR: see screenshot. This is how it works: * server-side, the entries are taken from 2 places: 1) the experts index of the devguide. This is done downloading and parsing the rst source. The new user.experts.html page returns this data as JSON. 2) the list of committers from the Roundup database. This is done retrieving the username and realname from the database. The new user.devs.html page returns this data as JSON to logged in users. The Python code to retrieve this data and convert to JSON is in a new extension called jnosy.py. * client-side, when the page loads, the browser: 1) checks if the two JSON files are cached in the HTML5 storage; 2) if HTML storage is not supported or if they are not cached, it requests from the JSON from the server (through the two user.*.html pages), and possibly caches the result; 3) the two JSON files are adapted and combined, in order to form a list of entries for the autocomplete. When the user writes in the nosy list, the autocomplete will list all the elements that match divided by category. The categories are the ones of the experts index (one per table), plus a "developer" category. The "developer" entries are listed first, and look like "Name Surname (username)". Once selected, only the username is added to the nosy. The "experts" entries list the name of the module/interest area/etc. followed by the list of names (e.g. 'unittest: michael.foord,ezio.melotti'), and once selected it adds all the names to the nosy. A few more random comments about the patch: * HTML5 storage allows the script to save data on the client's machine and it's available on all the major browsers (FF3.5+, IE8+, Chrome4+, Opera10.5+, Safari4+). * If the HTML5 storage is not available the script will request the data from the server, once for each issue page visited (all the data are downloaded only once when the page loads). * Both the pages return less than 5 kB of JSON, and both seem quite fast. * If JS is not available the autocomplete is not available, with no other side effects. * Having autocomplete for all the registered users, even if technically doable, has two major problems: 1) it takes about 10s for the server to put together a JSON object with all the names and usernames of 10k+ users and send it to the client (that's about 200+ kB of JSON); 2) it's probably really slow to process on the client-side and it will flood the autocomplete with lot of matching names (I haven't tried it though). * The user.devs.html page is not visible to not-logged in users. * Some server-side caching should be added, so that at least the expert page is not downloaded and parsed every time. I'm not sure if this should be done via the Cache-Control and/or Expires HTTP headers (that would prevent the browsers to send requests at all), or just keep the generated JSON in memory or in a local file, and update it, say, once a day. * The HTML5 storage cache should also be invalidated after a while, and the JSON requested again to the server. * Instead of having two separates files, a single file that returns a single JSON object with both developers and experts can be used. Unless there are problems with this design, I'll commit it and see what the users think about it. ---------- assignedto: ezio.melotti files: issue417.diff messages: 2216 nosy: ezio.melotti priority: feature status: in-progress title: Add autocomplete for the nosy list _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- Index: extensions/jnosy.py =================================================================== --- extensions/jnosy.py (revision 0) +++ extensions/jnosy.py (revision 0) @@ -0,0 +1,84 @@ +""" +This module provides two helper functions used by the Javascript autocomplete +of the nosy list: + 1) a simple state machine to parse the tables of the + experts index and turn them in a JSON object; + 2) a function to get the list of developers as a JSON object; +""" + +import urllib +try: + import json +except ImportError: + import simplejson as json + +url = 'http://hg.python.org/devguide/raw-file/default/experts.rst' + +# possible states +no_table = 0 # not parsing a table +table_header = 1 # parsing the header +table_content = 2 # parsing the content +table_end = 3 # reached the end of the table + +def experts_as_json(): + """ + Parse the tables of the experts index and turn them into a JSON object. + """ + data = {} + table_state = no_table + + try: + page = urllib.urlopen(url) + except Exception: + # if something goes wrong just return an empty JSON object + return '{}' + + for line in page: + columns = [column.strip() for column in line.split(' ', 1)] + # all the tables have 2 columns (some entries might not have experts, + # so we just skip them) + if len(columns) != 2: + continue + first, second = columns + # check if we found a table separator + if set(first) == set(second) == set('='): + table_state += 1 + if table_state == table_end: + table_state = no_table + continue + if table_state == table_header: + # create a dict for the category (e.g. 'Modules', 'Interest areas') + category = first + data[category] = {} + if table_state == table_content: + # add to the category dict the entries for that category + # (e.g.module names) and the list of experts + # if the entry is empty the names belong to the previous entry + entry = first or entry + names = (name.strip(' *') for name in second.split(',')) + names = ','.join(name for name in names if '(inactive)' not in name) + if not first: + data[category][entry] += names + else: + data[category][entry] = names + return json.dumps(data, separators=(',',':')) + + +def devs_as_json(cls): + """ + Generate a JSON object that contains the username and realname of all + the committers. + """ + users = [] + for user in cls.filter(None, {'iscommitter': 1}): + username = user.username.plain() + realname = user.realname.plain(unchecked=1) + if not realname: + continue + users.append([username, realname]) + return json.dumps(users, separators=(',',':')) + + +def init(instance): + instance.registerUtil('experts_as_json', experts_as_json) + instance.registerUtil('devs_as_json', devs_as_json) Index: html/issue.item.js =================================================================== --- html/issue.item.js (revision 88880) +++ html/issue.item.js (working copy) @@ -62,3 +62,153 @@ } }); }) + +$(document).ready(function() { + /* Add an autocomplete to the nosy list that searches the term in two lists: + 1) the list of users (both the user and the real name); + 2) the list of experts in the devguide; + Note: most of this code comes from the "categories" and "multiple values" + examples in http://jqueryui.com/demos/autocomplete/. */ + + // create a custom widget to group the entries in categories + $.widget("custom.catcomplete", $.ui.autocomplete, { + _renderMenu: function(ul, items) { + var self = this, current_category = ""; + // loop through the items, adding a
  • when a new category is + // found, and then render the item in the
      + $.each(items, function(index, item) { + if (item.category != current_category) { + ul.append("
    • " + item.category + "
    • "); + current_category = item.category; + } + self._renderItem(ul, item); + }); + } + }); + + function split(val) { + return val.split(/,\s*/); + } + function extractLast(term) { + return split(term).pop(); + } + + // this will be called once we have retrieved the data + function add_autocomplete(data) { + $("[name=nosy]") + // don't navigate away from the field on tab when selecting an item + .bind("keydown", function(event) { + if (event.keyCode === $.ui.keyCode.TAB && + $(this).data("autocomplete").menu.active) { + event.preventDefault(); + } + }) + .catcomplete({ + minLength: 2, // this doesn't seem to work + delay: 0, + source: function(request, response) { + // delegate back to autocomplete, but extract the last term + response($.ui.autocomplete.filter( + data, extractLast(request.term))); + }, + focus: function() { + // prevent value inserted on focus + return false; + }, + select: function(event, ui) { + var terms = split(this.value); + // remove the current input + terms.pop(); + // add the selected item + terms.push(ui.item.value); + // add placeholder to get the comma at the end + terms.push(""); + this.value = terms.join(",") ; + return false; + } + }); + } + + + // check if we have HTML5 storage available + try { + var supports_html5_storage = !!localStorage.getItem; + } catch(e) { + var supports_html5_storage = false; + } + alert('storage ' + supports_html5_storage); + + // this object receives the entries for the devs and experts and + // when it has both it calls add_autocomplete + var data = { + devs: null, + experts: null, + add: function(data, type) { + // type is either 'devs' or 'experts' + this[type] = data; + if (this.devs && this.experts) + add_autocomplete(this.devs.concat(this.experts)) + } + }; + + /* Note: instead of using a nested structure like: + {"Platform": {"plat1": "name1,name2", "plat2": "name3,name4", ...}, + "Module": {"mod1": "name1,name2", "mod2": "name3,name4", ...}, + ...} + (i.e. the same format sent by the server), we have to flat it down and + repeat the category for each entry, because the autocomplete wants a + flat structure like: + [{label: "plat1: name1,name2", value: "name1,name2", category: "Platform"}, + {label: "plat2: name3,name4", value: "name3,name4", category: "Platform"}, + {label: "mod1: name1,name2", value: "name1,name2", category: "Module"}, + {label: "mod2: name3,name4", value: "name3,name4", category: "Module"}, + ...]. + Passing a nested structure to ui.autocomplete.filter() and attempt + further parsing in _renderMenu doesn't seem to work. + */ + function get_json(file, callback) { + // Get the JSON from either the HTML5 storage or the server. + // file is either 'devs' or 'experts', + // the callback is called once the json is retrieved + var json; + if (supports_html5_storage && + (json = localStorage[file]) != null) { + // if we have HTML5 storage and already cached the JSON, use it + callback(JSON.parse(json), file); + } + else { + // if we don't have HTML5 storage or the cache is empty, request + // the JSON to the server + $.getJSON('user?@template='+file, function(rawdata) { + var objects = []; // array of objs with label, value, category + if (file == 'devs') { + // save devs as 'Name Surname (user.name)' + $.each(users, function(index, names) { + objects.push({label: names[1] + ' (' + names[0] + ')', + value: names[0], category: 'Developer'}); + }); + } + else { + // save experts as e.g. 'modname: user1,user2' + $.each(rawdata, function(category, entries) { + $.each(entries, function(entry, names) { + objects.push({label: entry + ': ' + names, + value: names, category: category}); + }); + }); + } + // cache the objects if we have HTML5 storage + if (supports_html5_storage) + localStorage[file] = JSON.stringify(objects); + callback(objects, file); + }); + } + } + + // request the JSON. This will get it from the HTML5 storage if it's there + // or request it to the server if it's not, The JSON will be passed to the + // data object, that will wait to get both the files before calling the + // add_autocomplete function. + get_json('experts', data.add); + get_json('devs', data.add); +}); Index: html/user.experts.html =================================================================== --- html/user.experts.html (revision 0) +++ html/user.experts.html (revision 0) @@ -0,0 +1,5 @@ + +{"Platform":{"platname":"name1,name2",...}, + "Module":{"modname":"name1,name2",...}, + ...} + Index: html/user.devs.html =================================================================== --- html/user.devs.html (revision 0) +++ html/user.devs.html (revision 0) @@ -0,0 +1,4 @@ + + [["username1","Real Name1"],["username2", "Real Name2"],...] + Index: html/issue.item.html =================================================================== --- html/issue.item.html (revision 88880) +++ html/issue.item.html (working copy) @@ -11,8 +11,11 @@ - + + + Index: html/style.css =================================================================== --- html/style.css (revision 88880) +++ html/style.css (working copy) @@ -513,3 +513,16 @@ .calendar_display .today { background-color: #afafaf; } + +.ui-autocomplete-category { + font-weight: bold; + padding: 0 .2em; + line-height: 1.2; +} + +.ui-autocomplete { + font-size: 75% !important; + max-height: 25em; + max-width: 20em; + overflow: auto; +} From metatracker at psf.upfronthosting.co.za Sat Aug 13 10:06:11 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Sat, 13 Aug 2011 08:06:11 +0000 Subject: [Tracker-discuss] [issue417] Add autocomplete for the nosy list In-Reply-To: <1313125486.66.0.367655724531.issue417@psf.upfronthosting.co.za> Message-ID: <1313222771.05.0.671012359959.issue417@psf.upfronthosting.co.za> Ezio Melotti added the comment: I committed an updated version in r88881. The things I changed are: * the autocomplete is not loaded anymore if the user can't edit the nosy; * names are added only once, duplicated are now discarded; * if the JSON in the local storage is older than one day, it will be downloaded again; ---------- status: in-progress -> testing _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sun Aug 14 08:57:47 2011 From: metatracker at psf.upfronthosting.co.za (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 14 Aug 2011 06:57:47 +0000 Subject: [Tracker-discuss] [issue416] Show bug status with a nice colour/image In-Reply-To: <1312992658.94.0.650426627964.issue416@psf.upfronthosting.co.za> Message-ID: <1313305067.31.0.86562436129.issue416@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I also think that adding icons would be no improvement. In addition, I find the proposed icons counter-intuitive: an "open bug report" is open in a different way than an "open folder". Resolving this as "won't fix". feth: if you find people supporting your idea, we may reconsider. ---------- nosy: +loewis status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Aug 15 11:05:15 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 15 Aug 2011 09:05:15 +0000 Subject: [Tracker-discuss] [issue417] Add autocomplete for the nosy list In-Reply-To: <1313125486.66.0.367655724531.issue417@psf.upfronthosting.co.za> Message-ID: <1313399115.84.0.746483233423.issue417@psf.upfronthosting.co.za> Ezio Melotti added the comment: No one complained yet, so I documented it in the devguide and I'm closing this. ---------- status: testing -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Aug 15 11:15:49 2011 From: metatracker at psf.upfronthosting.co.za (Ezio Melotti) Date: Mon, 15 Aug 2011 09:15:49 +0000 Subject: [Tracker-discuss] [issue296] XSS vulnerability in ok_message In-Reply-To: <1248205874.61.0.225589760626.issue296@psf.upfronthosting.co.za> Message-ID: <1313399749.92.0.907874565221.issue296@psf.upfronthosting.co.za> Ezio Melotti added the comment: Now the XSS vulnerability should be fixed (see #411), e.g.: issue?@template=xss issue?@ok_message= issue?@error_message= the ok_message supports a few tags, like and
      , but not
  •    
    +
    + + (expr) +
    +
    Keyword: + No Sort or group:    
    +
    + + (expr) +
    +
    Keyword: + No Sort or group:    
    +
    + + (expr) +
    +
    Keyword: + + tal:attributes="selected python:value == '-1'">not selected No Sort or group:    
    +
    + + (expr) +
    +