Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

We'll introduce filebug.pl and fixbug.pl which can be used to create and close JIRA issues from command line. 

Getting the Scripts

Both script are under support-d/utils in  FreeSWITCH™ source tree. If you don't want to clone the repository in your machine, here's the directly link for them:

filebug.pl: https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/support-d/utils/filebug.pl

fixbug.pl: https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/support-d/utils/fixbug.pl

Reporting bugs to JIRA

With filebug.pl you can submit new issues from your command line interface. There's a few dependencies that we need to install to make it properly work.

You'll need CPAN to install those deps, more information here.

Install Perl deps
cpan install Getopt::Long JIRA::REST Mozilla::CA 

(depending on your platform you'll need to run with sudo). 

The script has a few options that can be used, if none are provided it'll open your editor (Emacs or Vi) and ask for required data.

Creating an Issue
./filebug.pl -versions="1.6"
User: italorossi
Password:

After typing your password, your editor will be opened with the following:

; Enter the description lines beginning with a ; will be ignored.
Type your description here then save and quit.

Then it'll ask for the summary:

./filebug.pl
Password:
User: italorossi
Password:
Summary: Testing filebug.pl, ignore me.
Issue Posted: FS-8096%

Issue Posted: FS-8096 .

Options Available:

OptionExampleDescription
-bug
FS-8096
Use -bug=FS-8096 to post a comment to an existing issue.
-attach
/tmp/trace.log  Attach file to existing issue: ./filebug.pl -bug=FS-8096 -attach /tmp/test.log .
-comment
  Add "comment" to the issue.
-project
 FS|DOCS You can create FS issues (FreeSWITCH) or DOC (Documentations) issues.
-summary
 Error when... Issue summary, if not specified you'll be prompted.
-desc
This happens when...Description of the problem, if not specified your editor will be opened.
-components
mod_redis Component name, default to freeswitch-core, can be ',' separatted: "mod_conference,mod_redis,...".
-hash
bff9aab850a9
 Git commit hash when you tested with current master.
-user
 myuserJIRA username, if not provided you'll be prompted.
-pass
 mypass JIRA password, if not provided you'll be prompted.
-type
"Bug|Task|New Feature"
 Default to Bug.
-versions
"1.6"  Affected Versions separated by space: "1.6 1.7".
-noedit
 
Don't open you editor to edit description.
-terse
 Don't ask for all required fields. By default disabled, it'll ask for fields if you just ./filebug.pl
-debug
  

You can use the options in this way:

./filebug.pl -user=italorossi -components=mod_conference -project=FS -type="Bug" ...

Fixing bugs

We'll use fixbug.pl, it also has a few options like filebug.pl:

OptionExampleDescription
-bug-bug=FS-8096JIRA issue ID
-msg"Fixing blah..."Commit message, if equals to 'edit' it'll open your text editor. If you don't specify this option, it'll default to: FS-8096 #resolve $summary

where $summary is the JIRA issue summary.

You can also use %s to expand to summary or %b to expand to JIRA issue ID in your comment. Ex: -comment="Fixed %b: %s".

-debug Output git commit command for debug purpose
-comment"try latest master"|edit

Comment to be added on JIRA issue.

-author"Italo Rossi"git commit author

Example:

./fixbug -bug=FS-8096 -msg="Fixed the script!" -comment="Fixed :)" -author="Italo Rossi"

 

 

 

  • No labels