make cmdline query tool work with 2.18

RESOLVED FIXED in Bugzilla 2.18

Status

()

--
enhancement
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: afranke, Assigned: afranke)

Tracking

(Blocks: 1 bug)

2.18
Bugzilla 2.18
x86
Linux
Bug Flags:
approval +
approval2.18 +

Details

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
The cmdline query shell scripts in contrib/cmdline was created before the
buglist output got templatized.  It's time for an update...
(Assignee)

Comment 1

14 years ago
Created attachment 171628 [details]
New tar'ed and gzip'ed cmdline directory for 2.18

This cmdline.tgz contains a slightly updated query.conf, and the completely
overhauled scripts makequery, buglist, bugids, bugcount, bugs, bugslink.

It works with Bugzilla 2.18, and with some luck, it might even work on solaris
(at least I had it running once).  It should be more robust and more modular
than the previous scripts.

Usage is the same for all scripts: you specify the query conditions in form of
options, either short: -Sblocker,critical 
	     or long: --severity=blocker,critical
The mapping from option names to bugzilla fields can be configured in
query.conf.

* makequery is a separate script only for debugging / dry-run purposes: 
  It translates the command line args into a full query url with ctype=csv.

* buglist calls makequery and then wget's the url to stdout, making use of the
  COLUMNLIST environment variable if present.

* bugids calls buglist, saves the result in a temporary 'buglist.csv' file in
  the same directory, and extracts the bug-ids from it (separated by spaces).

* bugcount calls bugids and counts the bugs (using 'wc -w').

* bugs calls bugids and translates the separating spaces into commas

* bugslink adds a buglist.cgi url prefix to the result of bugs, printing a full

  url ready to paste into a browser, the url representing a static bug list.

As you can see, all scripts except makequery are pretty trivial.  (Btw,
four-line shell scripts don't need a full MPL license header, do they?)
(Assignee)

Comment 2

14 years ago
What is required to proceed in this case?
Flags: approval?

Updated

14 years ago
Flags: approval2.18?
Target Milestone: --- → Bugzilla 2.18
Thanks for the update!
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+

Comment 4

14 years ago
2.18:
Checking in contrib/cmdline/bugcount;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugcount,v  <--  bugcount
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in contrib/cmdline/bugids;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugids,v  <--  bugids
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in contrib/cmdline/buglist;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/buglist,v  <--  buglist
new revision: 1.1.20.1; previous revision: 1.1
done
Checking in contrib/cmdline/bugs;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugs,v  <--  bugs
new revision: 1.1.20.1; previous revision: 1.1
done
Checking in contrib/cmdline/bugslink;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugslink,v  <--  bugslink
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in contrib/cmdline/makequery;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/makequery,v  <--  makequery
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in contrib/cmdline/query.conf;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/query.conf,v  <--  query.conf
new revision: 1.1.20.1; previous revision: 1.1
done

Tip:
RCS file: /cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugcount,v
done
Checking in contrib/cmdline/bugcount;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugcount,v  <--  bugcount
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugids,v
done
Checking in contrib/cmdline/bugids;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugids,v  <--  bugids
initial revision: 1.1
done
Checking in contrib/cmdline/buglist;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/buglist,v  <--  buglist
new revision: 1.2; previous revision: 1.1
done
Checking in contrib/cmdline/bugs;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugs,v  <--  bugs
new revision: 1.2; previous revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugslink,v
done
Checking in contrib/cmdline/bugslink;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/bugslink,v  <--  bugslink
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/makequery,v
done
Checking in contrib/cmdline/makequery;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/makequery,v  <--  makequery
initial revision: 1.1
done
Checking in contrib/cmdline/query.conf;
/cvsroot/mozilla/webtools/bugzilla/contrib/cmdline/query.conf,v  <--  query.conf
new revision: 1.2; previous revision: 1.1
done
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.