From a2b9bc18e3a11ddc5b0c5dc1fff6edc57b9285b5 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Tue, 14 Sep 2010 22:47:47 +0200 Subject: Clarify the situation with getBugNo. * get rid off getBugId ... it was never used and silly * improve javadoc of getBugNo and explain why it is in util.js, although it would more belong to bzpage.js (hint: there are no unit tests for bzpage.js) * add a test showing that aliases are not convereted to proper numerical bug numbers --- lib/util.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/util.js') diff --git a/lib/util.js b/lib/util.js index 18a3c1b..0b1a79e 100644 --- a/lib/util.js +++ b/lib/util.js @@ -61,7 +61,12 @@ var getParamsFromURL = exports.getParamsFromURL = function getParamsFromURL (url }; /** - * FIXME this should go to bzpage.js ... no reason to keep it here + * Get a bug no from URL ... fails with aliases + * It should theoretically belong to bzpage.js, but we don't have + * unit tests there yet, so keeping here. + * + * @param url String with URL to be analyzed + * @return String with the bug ID (hopefully number, but not for aliases) */ exports.getBugNo = function getBugNo(url) { var params = getParamsFromURL(url); -- cgit