CN108920152B - Method for adding custom attribute in bugzilla - Google Patents
Method for adding custom attribute in bugzilla Download PDFInfo
- Publication number
- CN108920152B CN108920152B CN201810516508.5A CN201810516508A CN108920152B CN 108920152 B CN108920152 B CN 108920152B CN 201810516508 A CN201810516508 A CN 201810516508A CN 108920152 B CN108920152 B CN 108920152B
- Authority
- CN
- China
- Prior art keywords
- new
- database
- bugzilla
- variable
- param
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012986 modification Methods 0.000 abstract description 9
- 230000004048 modification Effects 0.000 abstract description 9
- 238000012423 maintenance Methods 0.000 abstract description 8
- 238000013461 design Methods 0.000 abstract description 2
- 238000004519 manufacturing process Methods 0.000 description 3
- 239000000203 mixture Substances 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Abstract
The invention provides a method for adding custom attributes in bugzilla, which comprises the following steps: a database is created for adding and editing the variable new _ param, and the variable new _ param is added to the bugzilla default database table. The invention provides a simplified thought and a simplified method for modifying a source code, which can add a new variable in bugzilla and adopt a new database table as an introduced base point on the basis of not changing and influencing the original code and design, provide an interface for the modification of subsequent maintenance, and greatly improve the later cost of code modification and maintenance.
Description
Technical Field
The invention relates to the field of software development management, in particular to a method for adding custom attributes in bugzilla.
Background
In the prior art, when an open-source Bugzilla code is applied to a product or Bug management of a user, when a new variable to be filled is added, only the type and input mode of the variable that have been designed in the Custom Fields in the Bugzilla code can be selected, including nine types, namely Date/Time, Integer, Bug ID, Multiple-Selection Box, Date, Large Text Box, Free Text, Drop Down, that are, the corresponding input mode is locked.
The fixed and unchangeable variable types and input modes in Bugzilla bring difficulty to the introduction of some special variables (such as the need of performing instant calculation on a page and the like). The user can not self-define the new variable and can not provide an interface for subsequent maintenance and modification, and the later cost of code modification and maintenance is greatly improved.
Disclosure of Invention
In order to solve the problems, the invention provides a method for adding custom attributes in bugzilla, which avoids modifying a large amount of original high-quality codes and adopts a new database table as a warehouse for adding and transmitting background data.
The technical task of the invention is realized by the following modes: the invention provides a method for adding custom attributes in bugzilla, which comprises the following steps: a database is created for adding and editing the variable new _ param, and the variable new _ param is added to the bugzilla default database table.
Further, the method comprises the following steps:
s1, adding a new database field _ new, and adding a variable new _ param into the newly generated database;
s2, adding a variable new _ param into the default database table of bugzilla;
s3, customizing an input mode, a display mode and a calculation mode of a variable new _ param in the front-end code, and transmitting the variable to the background perl code;
s4, updating the database content according to the new _ param value received in the background code;
s5, using update statement, importing the updated database content into bugzilla database.
Further, in step S1, the newly added database table field _ new primary key name is identical to the primary key name in the bug database default table.
Further, in step S2, a column is added to the default database table of bugzilla, and the column is used to add the variable new _ param.
Further, the new _ param variable type added in step S2 is the same as the variable type in the database field _ new and the variable attribute allows a null value.
Further, the specific implementation process in step S4 is as follows: filling default other data in the default database of bugzilla, leaving the newly introduced variable new _ param empty, and adding the updated content in the field _ new database into a newly added column of the bugzilla database by using the update statement in SQL, so as to facilitate the addition and customization of new variables.
Further, when updating the database content, the received new _ param value is written into the custom database field _ new together with the current bug _ id in the background code, i.e. a new variable is added to the database field _ new.
Further, if a new _ param value already exists in the custom database field _ new, a judgment statement is added, and the content of the bugzilla database is updated instead.
The invention has the beneficial effects that:
1. the invention avoids modifying a large amount of original high-quality codes and adopts a new database table as a warehouse for increasing and transmitting background data, thereby simplifying the difficulty of code modification and maintenance and saving the time and energy of development and code maintenance of programmers.
2. The invention provides a simplified thought and a simplified method for modifying a source code, and new variables can be added to bugzilla on the basis of not changing and influencing the original code and design.
3. The new data in the invention can adopt the new database table as the introduced site, thus providing an interface for the modification of the subsequent maintenance and greatly improving the later cost of code modification and maintenance.
Drawings
FIG. 1 is a diagram of the steps of the method of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention is provided in conjunction with the accompanying drawings, and the following disclosure provides specific embodiments of the apparatus and method for implementing the invention, so that those skilled in the art can more clearly understand how to implement the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention. It should be understood that while the invention has been described in conjunction with the preferred specific embodiments thereof, that these are set forth merely for purposes of illustration and are not intended to limit the scope of the invention.
Bugzilla is an open source defect Tracking System (Bug Tracking System) that can manage the entire lifecycle of defect submission (new), repair (resolve), shutdown (close), etc. in software development.
It is known that when the open-source Bugzilla code is applied to the product or bug management, many different variables and attributes can be set by utilizing the powerful existing functions of the Bugzilla. However, the types of the added new variables can only be selected from the types and input modes of the variables already designed in the Custom Fields in the Bugzilla code.
It is easier to modify the front-end code to implement new variables that are visible on the Web side. The technical difficulty is actually declaring a new variable in the intricate perl code and adding it to the original database. This does not sound as complex, but looking at the bugzilla's source code, one sees that a variable (e.g., bug version) appears in the code as many as 86 times and is distributed among 26 different code files. The calling relationship between each other is complicated and complicated.
The key difficulty is that each variable in the table is already determined by the bugzilla database when the bugzilla database is newly built, and a plurality of judgment functions exist in the code, such as field in post _ bug. Modifying parts of the above codes in turn involves more file codes, which is certainly a time-consuming task. How to simplify this introduced process is then the key to the problem resolution.
As shown in FIG. 1, the present invention proposes a method for adding custom attributes to bugzilla. The method comprises the following steps:
s1, add a new database field _ new, add the variable new _ param to the newly created database. Specifically, MySQL Workbench can be selected to establish a database, a new table is established, and data is added to the table.
S2, add a column in the bug default database table, the column is used to add the variable new _ param. For example, a column is added to the bug default database table bug, i.e. the new _ param variable needs to be added, note that the variable type is the same as in the table field _ new, and the variable attribute must be chosen to allow null values.
S3, defining the input mode, the display mode and the calculation mode of the variable new _ param in the front-end code by user, and transmitting the variable to the background perl code. Perl provides all the functionality of scripting languages (e.g., sed and awk), and it also supports the translation of sed to Perl and awd to Perl. As with scripting languages, Perl does not require a compiler and linker to run the code.
S4, the new _ param value received in the background code updates the database content. Wherein the received new _ param value is written into the custom database field _ new together with the current bug _ id in the background code, i.e. a new variable is added to the database field _ new. If the new _ param value already exists in the customized database field _ new, the judgment statement is added, and the content of the bugzilla database is updated instead.
S5, using update statement, importing the updated database content into bugzilla database. The default database of bugzilla has already filled in default other data, and the newly introduced variable new _ param is still empty; and updating the content in the database table field _ new into the table bug by using the update statement, namely realizing the addition of the new variable.
In the modification process of the code, the fact that the judgment and the verification for multiple times in the processes of simplifying the modification difficulty and number of the code is found to solve a problem that errors are caused in the updating and reading processes of the database information. The update statement in SQL can be used, and the content of the original table in the database can be updated by using another table without influencing the original data. Namely, the invention can customize various attributes such as the type, the input mode, the display mode and the like of the variable according to the requirement of the product.
Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the disclosure of the present invention, processes, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed, that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized according to the present invention. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.
Claims (7)
1. A method for adding custom attributes in bugzilla is characterized by comprising the following steps:
s1, adding a new database field _ new, and adding a variable new _ param into the newly generated database;
s2, adding a column into the default database table of bugzilla, wherein the column is used for adding a variable new _ param;
s3, customizing an input mode, a display mode and a calculation mode of a variable new _ param in the front-end code, and transmitting the variable to the background perl code;
s4, receiving the value of new _ param in the background code, and updating the database content;
s5, using update statement, importing the updated database content into bugzilla database.
2. The method for adding custom attributes to bugzilla as claimed in claim 1, wherein in step S1, the newly added database table field _ new primary key name is identical to the primary key name in the bug database default table.
3. The method of claim 1, wherein in step S2, a column is added to the default database table of bugzilla for adding a new variable new _ param.
4. The method of claim 1, wherein the new _ param variable type added in step S2 is the same as the variable type in the database field _ new and the variable attribute can be set to null.
5. The method for adding custom attributes to bugzilla according to claim 1, wherein the specific process of updating the database content in step S4 is as follows: in the background code, the received new _ param value is written to the custom database field _ new, along with the current bug _ id, where a new variable is added.
6. The method as claimed in claim 4, wherein if there is a new _ param value in the custom database field _ new, then add the judgment statement to update the bugzilla database content.
7. The method for adding custom attributes to bugzilla according to claim 1, wherein the specific implementation procedure in step S4 is as follows: filling default other data in the default database of bugzilla, leaving the newly introduced variable new _ param empty, and adding the updated content in the field _ new database to a newly added column of the bugzilla database by using the update statement in SQL to add a new variable.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810516508.5A CN108920152B (en) | 2018-05-25 | 2018-05-25 | Method for adding custom attribute in bugzilla |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810516508.5A CN108920152B (en) | 2018-05-25 | 2018-05-25 | Method for adding custom attribute in bugzilla |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108920152A CN108920152A (en) | 2018-11-30 |
CN108920152B true CN108920152B (en) | 2021-07-23 |
Family
ID=64410615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810516508.5A Active CN108920152B (en) | 2018-05-25 | 2018-05-25 | Method for adding custom attribute in bugzilla |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108920152B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8205191B1 (en) * | 2006-06-02 | 2012-06-19 | Parasoft Corporation | System and method for change-based testing |
CN102760152A (en) * | 2012-04-05 | 2012-10-31 | 中国人民解放军国防科学技术大学 | Automated open-source software quality evidence extraction method |
CN104899225A (en) * | 2014-03-07 | 2015-09-09 | 北京四达时代软件技术股份有限公司 | Object relational mapping method and device as well as processor |
CN106537332A (en) * | 2014-06-13 | 2017-03-22 | 查尔斯斯塔克德拉珀实验室公司 | Systems and methods for software analytics |
-
2018
- 2018-05-25 CN CN201810516508.5A patent/CN108920152B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8205191B1 (en) * | 2006-06-02 | 2012-06-19 | Parasoft Corporation | System and method for change-based testing |
CN102760152A (en) * | 2012-04-05 | 2012-10-31 | 中国人民解放军国防科学技术大学 | Automated open-source software quality evidence extraction method |
CN104899225A (en) * | 2014-03-07 | 2015-09-09 | 北京四达时代软件技术股份有限公司 | Object relational mapping method and device as well as processor |
CN106537332A (en) * | 2014-06-13 | 2017-03-22 | 查尔斯斯塔克德拉珀实验室公司 | Systems and methods for software analytics |
Non-Patent Citations (2)
Title |
---|
Bugzilla, ITracker, and other bug trackers;N.Serrano等;《IEEE Software》;20050321;第22卷(第2期);第11-13页 * |
自动化软件质量保证在CADS中的实现;尤永康;《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》;20051115(第07期);第I138-231页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108920152A (en) | 2018-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105487864B (en) | The method and apparatus of Code automatic build | |
US7610545B2 (en) | Annotations for tracking provenance | |
CN104461484B (en) | The implementation method and device of front-end template | |
EP2530583A1 (en) | Computer-implemented method, system and computer program product for displaying a user interface component | |
CN107273122A (en) | Based on decoupling mechanism can iteration set up operation system method and its terminal | |
CN103593414A (en) | Showing method and device of webpages in browser | |
CN105068813A (en) | Method and device for providing android package (APK) modification service | |
CN105389184A (en) | Configuration method and apparatus for product interface information | |
US20210365258A1 (en) | Method and system for updating legacy software | |
CN105095497A (en) | Method and device for generating webpage based on webpage template | |
CN104133676A (en) | Function execution method and function execution device based on scripts | |
CN108664242A (en) | Generate method, apparatus, electronic equipment and the readable storage medium storing program for executing of visualization interface | |
US20220277148A1 (en) | Model localization for data analytics and business intelligence | |
CN112130830A (en) | Interface generation method and device and electronic equipment | |
CN109558159B (en) | Method and device for updating user interface in game | |
CN104331288B (en) | A kind of configurationization shows the method and system of dynamic page | |
CN108920152B (en) | Method for adding custom attribute in bugzilla | |
US11922142B1 (en) | Bi-directional design-to-code | |
CN115686515A (en) | Parameter visualization configuration interface generation method, device, medium and electronic equipment | |
CN107665124A (en) | Modularization JavaScript file processing method, equipment and server | |
CN114356379A (en) | Backup-based service upgrading method, device, equipment and storage medium | |
CN111858595B (en) | Dynamic configuration method and system for electric power engineering examination record table | |
CN114518881A (en) | Page generation method, system and storage medium | |
CN105302425B (en) | A kind of processing method and electronic equipment of application | |
CN114115855A (en) | Code multiplexing method and device, computer readable storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |