CN108920152A - A method of increasing Custom Attributes in bugzilla - Google Patents

A method of increasing Custom Attributes in bugzilla Download PDF

Info

Publication number
CN108920152A
CN108920152A CN201810516508.5A CN201810516508A CN108920152A CN 108920152 A CN108920152 A CN 108920152A CN 201810516508 A CN201810516508 A CN 201810516508A CN 108920152 A CN108920152 A CN 108920152A
Authority
CN
China
Prior art keywords
new
bugzilla
database
param
variable
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.)
Granted
Application number
CN201810516508.5A
Other languages
Chinese (zh)
Other versions
CN108920152B (en
Inventor
徐潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810516508.5A priority Critical patent/CN108920152B/en
Publication of CN108920152A publication Critical patent/CN108920152A/en
Application granted granted Critical
Publication of CN108920152B publication Critical patent/CN108920152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of method for increasing Custom Attributes in bugzilla, and the method is:A newly-built database is added in the database table of bugzilla default for increasing and editing variable new_param newly, and by variable new_param.The invention proposes the simplification idea and methods of modification source code, it can be on the basis of not changing and not influencing original code and design, new variables can be increased and using new database table as the strong point introduced in bugzilla, modification for subsequent maintenance provides interface, substantially increases the rear period cost of code revision and maintenance.

Description

A method of increasing Custom Attributes in bugzilla
Technical field
It is specifically a kind of to increase Custom Attributes in bugzilla the present invention relates to software development management field Method.
Background technique
In the prior art, when the Bugzilla code of open source being applied in the product or bug management of oneself, increasing When the new variables for needing to fill in, designed variable class can only be selected in Bugzilla code inside Custom Fields Type and input mode, including Date/Time, Integer, Bug ID, Multiple-Selection Box, Date, Large This nine seed type of Text Box, Free Text, Drop Down, that is, locked corresponding input mode.
Changeless types of variables and input mode (such as are needed in the page to some special variables in Bugzilla Carry out instant computing etc.) introducing bring difficulty.User can not be customized for new variables progress, can not be subsequent maintenance Modification provides interface, substantially increases the rear period cost of code revision and maintenance.
Summary of the invention
To solve the above-mentioned problems, the present invention provides a kind of in bugzilla increases the method for Custom Attributes, keeps away Open a large amount of original high-quality codes of modification, the warehouse for increasing and transmitting as back-end data using a new database table.
Technical assignment of the invention is realized in the following manner:The present invention provides a kind of increase in bugzilla and makes by oneself The method of adopted attribute, the method are:A newly-built database is for increasing and editing variable new_param newly, and by variable New_param is added in the database table of bugzilla default.
Further, the method includes the following steps:
S1 adds a new database field_new, and variable new_param is added into newly-generated database;
Variable new_param is added in S2 in the database table of bugzilla default;
S3, the input mode, display mode and calculation of custom variable new_param in front-end code, and will Variable is transmitted in the perl code of backstage;
S4, the value of the new_param received in the code of backstage, more new database content;
S5 is imported updated data-base content in bugzilla database using update sentence.
Further, in step S1, newly added database table field_new major key title and bugzilla database are silent It is completely the same to recognize major key title in table.
Further, in step S2, a column are added in the database table of bugzilla default, the column become for being added Measure new_param
Further, the new_param types of variables being added in step S2 and types of variables phase in database field_new Same and variable's attribute allows null value.
Further, in step S4 the specific implementation process is as follows:Default is filled in the default database of bugzilla Other data, and the variable new_param newly introduced is also sky, updates sentence using the update in SQL, by database Updated content in field_new is added in the column that bugzilla database is newly added, and is convenient for new variables Increase and customized.
Further, when more new database content, in the code of backstage, by the value of the new_param received together with working as Preceding bug_id is written to together in customized database field_new, i.e., new change is increased in database field_new Amount.
Further, if having existed new new_param value in customized database field_new, increase is sentenced Conclusion sentence is changed to update bugzilla data-base content.
The beneficial effects of the invention are as follows:
1, the present invention avoids modifying a large amount of original high-quality codes, is increased using a new database table as back-end data With the warehouse of transmitting, to simplify the difficulty of code revision and maintenance, save programming personnel's exploitation and code maintenance when Between and energy.
2, the invention proposes the simplification idea and methods of modification source code, can not change and not influence original code On the basis of design, new variables can be increased in bugzilla.
3, data new in the present invention can be using new database table as the strong point introduced, for repairing for subsequent maintenance Change and provide interface, substantially increases the rear period cost of code revision and maintenance.
Detailed description of the invention
Fig. 1 is the method for the present invention block diagram.
Specific embodiment
Below in conjunction with the attached drawing specific embodiment that the present invention will be described in detail, following disclosure provides specific embodiment For realizing the device of the invention and method, those skilled in the art is made to be more clearly understood that how to realize the present invention.In order to Simplify disclosure of the invention, hereinafter the component of specific examples and setting are described.In addition, the present invention can be in different examples Repeat reference numerals or letter in son.This repetition is for purposes of simplicity and clarity, itself not indicate discussed various Relationship between embodiment or setting.It should be noted that illustrated component is not drawn necessarily to scale in the accompanying drawings.The present invention saves The description to known assemblies and treatment technology and process has been omited to avoid the present invention is unnecessarily limiting.It will be appreciated that though this Invention describes its preferred embodiment, however these are elaborations to embodiment, rather than limits the present invention Range.
Bugzilla is the defect tracking system (Bug-Tracking System) of an open source, it can be with management software The submission (new) of defect in exploitation is repaired (resolve), and whole life cycles such as (close) are closed.
It is known that being can benefit when the Bugzilla code of open source is applied in the product or bug management of oneself With the customized setting of the powerful existing capability of bugzilla many different variables and attribute.But increased new variables Type can only select in Bugzilla code inside Custom Fields designed types of variables and input mode.
Modification front-end code is to realize that the new variables that can be seen at the end Web is easier to realize.But technological difficulties its It is to declare new variables in complicated perl code and he is added in original database in fact.This is sounded as not multiple It is miscellaneous, but it is to look at the source code of bugzilla, it is found that the number that a variable (such as bug_severity) occurs in code Up to 86 times, and be distributed in 26 different code files.Mutual call relation is intricate.
It is every in table to be that bugzilla database just has determined that when newly-established for crucial difficult point in fact A variable, and there are multiple discriminant functions in code, such as the sub_ in field, Object.pm in post_bug.cgi Bz_column_info in check_field and DB.pm, the variable being related between these want consistent, ability with definition Enough realize the introducing of variable.And the part in the above code is successively modified, more document codes are further related to, when this is undoubtedly Between the excessively high work of cost.Then the process for how simplifying this introducing is only the key of Resolving probiems.
Increase the method for Custom Attributes as shown in Figure 1, the invention proposes a kind of in bugzilla.The method Include the following steps:
S1 adds a new database field_new, and variable new_param is added into newly-generated database.Tool Body can select MySQL Workbench to establish database, establish new table, add data for table.
A column are added in S2 in the database table of bugzilla default, and the column are for being added variable new_param.Example A column are such as added in the database table bug of bugzilla default, that is, the variable new_param for needing to be added pays attention to variable class Type is identical with table field_new, and selection permission null value is had in variable's attribute.
S3, the input mode, display mode and calculation of custom variable new_param in front-end code, and will Variable is transmitted in the perl code of backstage.The institute that Perl provides scripting language (such as sed and awk) is functional, it also supports sed to arrive The translater of Perl and awd to Perl.As scripting language, Perl does not need compiler and linker to run code.
S4, the value of the new_param received in the code of backstage, more new database content.It, will wherein in the code of backstage The value of the new_param received is written in customized database field_new together with current bug_id, that is, is existed New variables is increased in database field_new.If having existed new new_ in customized database field_new Param value then increases judgement sentence, is changed to update bugzilla data-base content.
S5 is imported updated data-base content in bugzilla database using update sentence.Bugzilla's Other data of default have been filled in default database, and the variable new_param newly introduced is also empty;Use update Sentence realizes the increase of new variables by the content update in database table field_new into table bug.
It is found during the modification of code, multiple judgement and verifying in simplified code modification difficulty and quantity process, It is provided to solve the problems, such as one, that is, prevent the update and reading process error of database information.It can be used in SQL Update updates sentence, is updated using content of another table to table original in database, without influencing legacy data. I.e. the present invention can be according to a variety of attributes such as the types, input mode, display mode for needing custom variable of product.
In addition, application range of the invention is not limited to the technique, mechanism, system of specific embodiment described in specification It makes, material composition, means, method and step.From the disclosure, will be easy as those skilled in the art Ground understands, for current technique that is existing or will developing later, mechanism, manufacture, material composition, means, method or Step, the knot that the function or acquisition that wherein they are executed is substantially the same with the corresponding embodiment that the present invention describes are substantially the same Fruit can apply them according to the present invention.Therefore, appended claims of the present invention are intended to these techniques, mechanism, system It makes, material composition, means, method or step are included in its protection scope.

Claims (8)

1. a kind of method for increasing Custom Attributes in bugzilla, characterized in that the method is:Create a data Library is added to the database table that bugzilla defaults for increasing and editing variable new_param newly, and by variable new_param In.
2. a kind of method for increasing Custom Attributes in bugzilla according to claim 1, characterized in that described Method includes the following steps:
S1 adds a new database field_new, and variable new_param is added into newly-generated database;
Variable new_param is added in S2 in the database table of bugzilla default;
S3, the input mode, display mode and calculation of custom variable new_param in front-end code, and by variable It is transmitted in the perl code of backstage;
S4 receives the value of new_param, more new database content in the code of backstage;
S5 is imported updated data-base content in bugzilla database using update sentence.
3. a kind of method for increasing Custom Attributes in bugzilla according to claim 2, characterized in that step S1 In, newly added database table field_new major key title and major key title in bugzilla database default table are completely the same.
4. a kind of method for increasing Custom Attributes in bugzilla according to claim 2, characterized in that step S2 In, a column are added in the database table of bugzilla default, the column are for increasing new variable new_param.
5. a kind of method for increasing Custom Attributes in bugzilla according to claim 2, characterized in that step S2 The new_param types of variables of middle addition is identical as types of variables in database field_new and null value is arranged in variable's attribute.
6. a kind of method for increasing Custom Attributes in bugzilla according to claim 2, characterized in that step S4 In the specific implementation process is as follows:Other data of default, the variable newly introduced are filled in the default database of bugzilla New_param is also sky, updates sentence using the update in SQL, the updated content in database field_new is added It is added in the column that bugzilla database is newly added, carries out the increase of new variables.
7. a kind of method for increasing Custom Attributes in bugzilla according to claim 6, characterized in that update number When according to library content, in the code of backstage, the value of the new_param received is written to together with current bug_id and is made by oneself In the database field_new of justice, new variables is increased in database field_new.
8. a kind of method for increasing Custom Attributes in bugzilla according to claim 7, characterized in that if making by oneself New new_param value is had existed in the database field_new of justice, then increases judgement sentence, is changed to update bugzilla Data-base content.
CN201810516508.5A 2018-05-25 2018-05-25 Method for adding custom attribute in bugzilla Active CN108920152B (en)

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 true CN108920152A (en) 2018-11-30
CN108920152B 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
N.SERRANO等: "Bugzilla, ITracker, and other bug trackers", 《IEEE SOFTWARE》 *
尤永康: "自动化软件质量保证在CADS中的实现", 《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》 *

Also Published As

Publication number Publication date
CN108920152B (en) 2021-07-23

Similar Documents

Publication Publication Date Title
US11733975B1 (en) System and method for migrating legacy software to a system common architecture
US6651240B1 (en) Object-oriented software development support apparatus and development support method
US20040111702A1 (en) Method and apparatus for visual programming
US20090125875A1 (en) Method for manufacturing a final product of a target software product
WO1999052047A1 (en) Method and system for migrating data
CN110471694A (en) Annotation information processing method, device, computer equipment and storage medium
US20090259484A1 (en) Systems and methods for employee compensation planning
CN107153535A (en) A kind of operation ElasticSearch method and device
US20210365258A1 (en) Method and system for updating legacy software
CN109933326A (en) Rewrite Compilation Method, device and the corresponding terminal of code
CN104503778A (en) Installation method and installation device for applications
Radošević et al. Source code generator based on dynamic frames
JPH06332712A (en) Data processing system having object
CN108664242A (en) Generate method, apparatus, electronic equipment and the readable storage medium storing program for executing of visualization interface
Varela et al. EpiLog: A software for the logical modelling of epithelial dynamics
WO2000022517A1 (en) Component-based source code generator
CN108292521A (en) RTSM systems are generated for clinical test
CN108920152A (en) A method of increasing Custom Attributes in bugzilla
Laitinen Document classification for software quality systems
Lausen et al. The INCOME Approach for Conceptual Modelling and Prototyping of Information Systems.
US6976188B2 (en) System and method for creating a customized power on self test (POST) program for use in a computing system
de Almeida et al. A Model-Driven Approach for Code Generation for Web-based Information Systems Built with Frameworks
CN110990256B (en) Open source code detection method, device and computer readable storage medium
Tollefson et al. R quick syntax reference
Filipe et al. XIS-CMS: Towards a model-driven approach for developing platform-independent CMS-specific modules

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