1BZ::Client::Bugzilla(3)User Contributed Perl DocumentatioBnZ::Client::Bugzilla(3)
2
3
4

NAME

6       BZ::Client::Bugzilla - Information about the Bugzilla server, i.e. the
7       Bugzilla::Webservices::Bugzilla API
8

VERSION

10       version 4.4004
11

SYNOPSIS

13       This class provides methods for accessing information about the
14       Bugzilla servers installation.
15
16         my $client = BZ::Client->new( url      => $url,
17                                       user     => $user,
18                                       password => $password );
19
20         my $extensions = BZ::Client::Bugzilla->extensions( $client );
21         my $time = BZ::Client::Bugzilla->time( $client );
22         my $version = BZ::Client::Bugzilla->version( $client );
23

CLASS METHODS

25       This section lists the class methods, which are available in this
26       module.
27
28   extensions
29        %extensions = BZ::Client::Bugzilla->extensions( $client );
30        $extensions = BZ::Client::Bugzilla->extensions( $client );
31
32       Returns a hash or hash ref information about the extensions that are
33       currently installed and enabled in this Bugzilla.
34
35       History
36
37       Added in Bugzilla 3.2.
38
39       As of Bugzilla 3.6, the names of extensions are canonical names that
40       the extensions define themselves. Before 3.6, the names of the
41       extensions depended on the directory they were in on the Bugzilla
42       server.
43
44       Parameters
45
46       (none)
47
48       Returns
49
50       The hash contains the names of extensions as keys, and the values are a
51       hash.
52
53       That hash contains a single key "version", which is the version of the
54       extension, or 0 if the extension hasn't defined a version.
55
56       The return value looks something like this:
57
58        {
59          Example => {
60            version => '3.6',
61          },
62          BmpConvert => {
63            version => '1.0',
64          },
65        }
66
67   last_audit_time
68        $last_audit_time = BZ::Client::Bugzilla->extensions( $client, \%params );
69
70       Gets the latest time of the "audit_log" table.
71
72       History
73
74       Added in Bugzilla 4.4.
75
76       Parameters
77
78       You can pass the optional parameter "class" to get the maximum for only
79       the listed classes.
80
81       class
82           class (array) - An array of strings represetning the class names.
83
84           Note: The class names are defined as "Bugzilla::class_name". For
85           the product use Bugzilla::Product.
86
87       Returns
88
89       The maximum of the "at_time" from the "audit_log", as a DateTime
90       object.
91
92   parameters
93        %parameters = BZ::Client::Bugzilla->parameters( $client );
94        $parameters = BZ::Client::Bugzilla->parameters( $client );
95
96       Returns a hash or hashref containing the current Bugzilla parameters.
97
98       History
99
100       Added in Bugzilla 4.4.
101
102       Parameters
103
104       (none)
105
106       Returns
107
108       A logged-out user can only access the "maintainer" and "requirelogin"
109       parameters.
110
111       A logged-in user can access the following parameters (listed
112       alphabetically): "allowemailchange", "attachment_base",
113       "commentonchange_resolution", "commentonduplicate", "cookiepath",
114       "defaultopsys", "defaultplatform", "defaultpriority",
115       "defaultseverity", "duplicate_or_move_bug_status", "emailregexpdesc",
116       "emailsuffix", "letsubmitterchoosemilestone",
117       "letsubmitterchoosepriority", "mailfrom", "maintainer",
118       "maxattachmentsize", "maxlocalattachment", "musthavemilestoneonaccept",
119       "noresolveonopenblockers", "password_complexity", "rememberlogin",
120       "requirelogin", "search_allow_no_criteria", "urlbase", "use_see_also",
121       "useclassification", "usemenuforusers", "useqacontact",
122       "usestatuswhiteboard", "usetargetmilestone".
123
124       A user in the "tweakparams" group can access all existing parameters.
125       New parameters can appear or obsolete parameters can disappear
126       depending on the version of Bugzilla and on extensions being installed.
127       The list of parameters returned by this method is not stable and will
128       never be stable.
129
130   time
131        %timeinfo = BZ::Client::Bugzilla->time( $client );
132        $timeinfo = BZ::Client::Bugzilla->time( $client );
133
134       Gets information about what time the Bugzilla server thinks it is, and
135       what timezone it's running in.
136
137       History
138
139       Added in Bugzilla 3.4.
140
141       Note: As of Bugzilla 3.6, this method returns all data as though the
142       server were in the UTC timezone, instead of returning information in
143       the server's local timezone.
144
145       Parameters
146
147       (none)
148
149       Returns
150
151       A hash with the following items:
152
153       db_time
154           db_time (DateTime) -  The current time in UTC, according to the
155           Bugzilla database server.
156
157           Note that Bugzilla assumes that the database and the webserver are
158           running in the same time zone. However, if the web server and the
159           database server aren't synchronized for some reason, this is the
160           time that you should rely on for doing searches and other input to
161           the WebService.
162
163       web_time
164           web_time (DateTime) -  This is the current time in UTC, according
165           to Bugzilla's web server.
166
167           This might be different by a second from "db_time" since this comes
168           from a different source. If it's any more different than a second,
169           then there is likely some problem with this Bugzilla instance. In
170           this case you should rely on the "db_time", not the "web_time".
171
172       web_time_utc
173           Identical to "web_time". (Exists only for backwards-compatibility
174           with versions of Bugzilla before 3.6.)
175
176       tz_name
177           tz_name (string) - The literal string "UTC". (Exists only for
178           backwards-compatibility with versions of Bugzilla before 3.6.)
179
180       tz_short_name
181           tz_short_name (string) - The literal string "UTC". (Exists only for
182           backwards-compatibility with versions of Bugzilla before 3.6.)
183
184       tz_offset
185           tz_offset (string) - The literal string +0000. (Exists only for
186           backwards-compatibility with versions of Bugzilla before 3.6.)
187
188   timezone
189        $timezone = BZ::Client::Bugzilla->timezone( $client );
190
191       Returns the Bugzilla servers timezone as a numeric value. This method
192       is deprecated: Use "time" instead.
193
194       Note: as of Bugzilla 3.6 the timezone is always +0000 (UTC) Also,
195       Bugzilla has depreceated but not yet removed this API call
196
197   version
198        $version = BZ::Client::Bugzilla->version( $client );
199
200       Returns the Bugzilla servers version.
201

EXCEPTION HANDLING

203       See BZ::Client::Exception
204

SEE ALSO

206       BZ::Client, BZ::Client::API, Bugzilla API
207       <https://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Bugzilla.html>
208

AUTHORS

210       •   Dean Hamstead <dean@bytefoundry.com.au>
211
212       •   Jochen Wiedmann <jochen.wiedmann@gmail.com>
213
215       This software is copyright (c) 2021 by Dean Hamstad.
216
217       This is free software; you can redistribute it and/or modify it under
218       the same terms as the Perl 5 programming language system itself.
219
220
221
222perl v5.34.0                      2022-01-20           BZ::Client::Bugzilla(3)
Impressum