![]() You don't need to specify a value for the bug_id column. The keys should be the names of columns in the bugs_activity table to set for each change.Īnd field (containing the name of some field) is taken instead of fieldid. Representing the history of changes made to this bug. Who must be a username instead of a user id, The keys should be the names of columns in the longdescs table that you want to set for each comment. Representing comments to be added to the database. The hashes can contain three additional items: comments The hashes will be passed to "create" in Bugzilla::Bug to create bugs in Bugzilla. These are methods that subclasses must implement: _read_bugs Returns undef if the field could not be translated. Takes a single argument-the name of a field to translate. Using the rules described in the description of the $translate_fields configuration variable. Translates a field name in your bug-tracker to a field name in Bugzilla, (Note: Normally you don't need to use this,īecause "translate_bug" handles it for you.) Translate_value will be called recursively on all the array elements.Īny date field will be converted into ISO 8601 format,įor inserting into the database. The first being a field name and the second being a value. Uses the $translate_values configuration variable to convert field values from your bug-tracker to Bugzilla. (Note: Generally you only need to use this during "_read_products" and "_read_users" if necessary,īecause the data returned from "_read_bugs" will be put through "translate_bug".) The hashref that you pass in will be destroyed (all keys will be deleted). Returns both the translated bug and a second hashref containing the values of any untranslated fields that were listed in NON_COMMENT_FIELDS. Unless they are listed in "NON_COMMENT_FIELDS". Uses the $translate_fields and $translate_values configuration variables to convert a hashref of "other bug-tracker" fields into Bugzilla fields.Īny unrecognized fields will have their value prepended to the comment element in the returned hashref, (Note: Normally you don't have to call this yourself, The "timezone" configuration parameter will be used as the timezone of the date. Parses a date string and returns a formatted date string that can be inserted into the database. (Note: Usually you don't need to call this,īecause "translate_bug" handles date translations for you, The second argument is a number-the string will only be printed if the user specified -verbose at least that many times on the command line. The first argument is a string or reference to print to STDERR.ĭata::Dumper will be used to print the data structure. If the user hasn't specified -verbose on the command line, If the configuration file hasn't been read, METHODS YOUR SUBCLASS CAN USE configĪnd returns the value of the configuration variable with that name (always a scalar). Returns a new Bugzilla::Migrate object that can be used to migrate from the requested bug-tracker. ![]() That already exist will just be re-used by this script,Ĭalled like Bugzilla::Migrate->load('Module'). The migrator never creates anything that already exists. If there are any errors during the process, This includes creating any product versions and milestones that need to be created.Įverything happens in one big transaction, This is done by reading all the values on every bug that was read in and creating any values that don't already exist in Bugzilla for every drop-down or multi-select field on each bug. Any legal values that need to be created for any drop-down or multi-select fields are created.Some migrators need to create custom fields before migrating,.All bugs are translated from the other bug-tracker's fields/values into Bugzilla's fields values using "translate_bug".Bugs are read from the other bug-tracker.Products are read from the other bug-tracker.Users are read from the other bug-tracker.The migrator will read everything from the other bug-tracker's database. HOW MIGRATION WORKSīefore writing anything to the Bugzilla database, The documentation for this module exists mostly to assist people in creating new migrators for other bug-trackers than the ones currently supported. This module acts as a base class for the various modules that migrate from other bug-trackers. Bugzilla::Migrate - Functions to migrate from other databases DESCRIPTION
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |