From 4980d09370db1a86eb47eb21cc3b562fc6204319 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 17 Nov 2009 21:16:08 +0000 Subject: Fix POD of Bugzilla::Migrate to be consistent with reality (it was slightly out-of-sync with the code when I first checked it in, because some things ended up working differently than they originally did as I developed, but the POD didn't get updated at the end). --- Bugzilla/Migrate.pm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'Bugzilla/Migrate.pm') diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index 40249bf50..282279e75 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -1007,13 +1007,19 @@ user specified C<--verbose> at least that many times on the command line. =head2 parse_date +(Note: Usually you don't need to call this, because L +handles date translations for you, for bug data.) + Parses a date string and returns a formatted date string that can be inserted into the database. If the input date is missing a timezone, the "timezone" configuration parameter will be used as the timezone of the date. =head2 translate_bug -Uses the C<$translate_fields> and <$translate_values> configuration variables +(Note: Normally you don't have to call this yourself, as +C does it for you.) + +Uses the C<$translate_fields> and C<$translate_values> configuration variables to convert a hashref of "other bug-tracker" fields into Bugzilla fields. It takes one argument, the hashref to convert. Any unrecognized fields will have their value prepended to the C element in the returned @@ -1028,9 +1034,11 @@ B To save memory, the hashref that you pass in will be destroyed =head2 translate_value -(Note: Normally you will want to use L instead of this.) +(Note: Generally you only need to use this during L +and L if necessary, because the data returned from +L will be put through L.) -Uses the C configuration variable to convert +Uses the C<$translate_values> configuration variable to convert field values from your bug-tracker to Bugzilla. Takes two arguments, the first being a field name and the second being a value. If the value is an arrayref, C will be called recursively on all @@ -1039,13 +1047,10 @@ the array elements. Also, any date field will be converted into ISO 8601 format, for inserting into the database. -You must use this to translate any bug field values that you return -during L, so that they are valid values for -L. - =head2 translate_field -(Note: Normally you will want to use L instead of this.) +(Note: Normally you don't need to use this, because L +handles it for you.) Translates a field name in your bug-tracker to a field name in Bugzilla, using the rules described in the description of the C<$translate_fields> @@ -1063,7 +1068,7 @@ These are methods that subclasses must implement: Should return an arrayref of hashes. The hashes will be passed to L to create bugs in Bugzilla. In addition to -the normal C fields, the hashes can contain two additional +the normal C fields, the hashes can contain three additional items: =over @@ -1075,7 +1080,7 @@ database. The keys should be the names of columns in the longdescs table that you want to set for each comment. C must be a username instead of a user id, though. -You don't need to specify a value for C column. +You don't need to specify a value for the C column. =item history @@ -1085,7 +1090,7 @@ bugs_activity table to set for each change. C must be a username instead of a user id, though, and C (containing the name of some field) is taken instead of C. -You don't need to specify a value for C column. +You don't need to specify a value for the C column. =item attachments @@ -1095,7 +1100,7 @@ must be a file handle--we recommend using L to create anonymous temporary files for this purpose.) You should specify a C argument containing the username of the attachment's submitter. -You don't need to specify a value for the C argument. +You don't need to specify a value for the the C argument. =back @@ -1141,11 +1146,6 @@ always include the default C (by calling $self->SUPER::CONFIG_VARS) as part of your return value, if you override this method. -In addition to the normal fields from C, you can also -specify a C key for each item, which should be a subroutine -reference. When the configuration file is read, this subroutine will be -called (as a method) to make sure that the value is valid. - =head2 NON_COMMENT_FIELDS An array (not an arrayref). If there are fields that are not translated -- cgit v1.2.3-24-g4f1b