Bugs, Feature Requests and the Ticket System

This is my second blog here on FreePBX, [url=http://www.freepbx.org/news/2008-10-28/an-introduction-and-an-announcement]the first one[/url] was in 2008, that blog covered the localization system in FreePBX and the struggle we had to make FreePBX working in different languages.
A lot of thing have happened during these past years. We have gone from FreePBX 2.5 to the upcoming FreePBX 2.9 and it has been fun and educational.

But what do we actually do as a [b]Developer[/b] in FreePBX? The question arise from time to time and I decided to write something about what we do and how we do it.

First of all we fix bugs, that is the main priority. Then, between FreePBX releases, we add features to FreePBX.

[size=15]What is a Bug, and what is a Feature Request?[/size]

A [b]Bug[/b] is when something is broken in FreePBX.
By broken we mean that something does not work when you call into the system (or call out) due to some error in the Asterisk dial plan. Most bugs are detected in the alpha or beta release.

Then there is the [b]Feature Request[/b], that is when someone wants to have a feature in FreePBX that he or she find useful.
This is something that extends the functions and features in FreePBX. A feature request can be for inclusion of more fields in Extensions, like new peer settings when using Asterisk 1.8

[size=15]Someone posted a Bug that was changed to a Feature Request, who decided that and why?[/size]

The decision is made by the developer that first read the ticket, he first try to duplicate the bug, if the ticket is found valid and the Developer can duplicate it, it stays as a bug. When the ticket is examined it is also checked if the posted details in the ticket can be valid as a bug. Sometimes the ticket is changed to a Feature Request, the poster want to have a function in FreePBX that extends the current implementation.
A ticket change it’s not a matter of ‘right or wrong’ as both the reporter and the developer may be correct from their perspective. For the project, the developer base the ticket change from the amount of work to address the desired change which may involve incremental development and/or testing of various scenarios vs. ‘fixing’ some ‘broken’ scenario.
[u][b]A ticket change should never ever be taken personally[/b][/u], we base ticket changes from the reported issue, not by the reporter.

As a reporter, someone may run into an issue that they consider major or even critical for what they are trying to achieve. As a project, we will try to assess the relative priority based on both existing bugs as well as our judgment as to the impact on the project and user base as a whole. None of these changes should ever be taken personally and we are also very capable of making mistakes whether in such changes, or even closing bugs for any reason. You are always welcome to ask why something was changed or respectfully disagree providing your reasons why you think something should be different. We have made plenty of mistakes in the past as does everyone and making changes once things are civilly discussed is very easy for all parties involved…

[size=15]Do I get payed to work as a Developer for FreePBX?[/size]

No, I don’t, I do this mostly on my spare time. The company in Sweden were I work have been using Asterisk and FreePBX for about 4,5 year now.
It is a busy system with a lot of queues and ring groups. We currently have 5 locations, 90 SIP phones, 326 DID’s and one server. We use SIP all the way.
Most of the bugs in FreePBX that I have found was from using FreePBX at work. Ticket 3963 was discovered when I added a new extension and our support department came and asked if there was something wrong with the PBX as they have not received any calls since an hour and a half. The time spent on fixing that was donated by my company.
A ticket that I looked into was #3805, I helped out by adding extra detection for certain HANGUPCAUSE, timboothby filed the ticket and nicson provided some details and code that I could use, Philippe have provided a new module, Route Congestion Messages, that we added the code to.
We needed this at work as we use Grandstream phones, and they have a default timeout of 4 second before the phone automatically dials the number, but sometimes a person begin to dial a number, pauses for some reason, and they get “All circuits are busy now”. With the addition of HANGUPCAUSE 28 I could record a message that says “The number you have dialed is to short”.
I also have taken under my wings two modules, Bulk DID’s and Bulk Extensions, as I find those two modules quite useful. By doing that, those modules are now in the main repository for FreePBX and are maintained on a regularly basis.

I do hope this blog will let you understand what choices we make regarding tickets and why we decide how to classify them.

From time to time we get appreciation from users that find FreePBX valuable (thank you), sometimes we get bashed for doing things that one or two dislikes.
But we continue our mission, to make FreePBX the best GUI for Asterisk.

Mikael Carlsson

An introduction and an announcement

Hi, my name is Mikael Carlsson and this is my first blog entry here on FreePBX.

I decided in December 2007 that I would translate FreePBX to Swedish as we were using it at our company and wanted some of the modules in Swedish. After reading up on the matter I filed a Feature Request #2571 that proposed a change in how translation should work for FreePBX as I was not that happy with the solution that existed. I also posted this in the wiki: NewLanguageSystem. There was some interesting discussion about the matter but it kind of dried out. I then decided to skip the proposal and go on with the translation as instructed on the wiki: OldPageI18n (note that this page is now obsolete).

Oh boy, that was a task, there were a lot of text strings that did not translate and there were a lot of spelling errors. I started to post the spelling errors as tickets and got back a plea from one of the developers that I should post the spelling errors as a diff file. I started to do that, and quite frankly, there were many spelling errors, so I posted about 15 tickets and as a result of that I got an e-mail from Philippe that asked me if I was willing to check in the changes to svn by myself. A couple of emails later I got access to svn so that I could commit my own changes. My status on the forum went from tadpole to Contributor. And I started to send in my fixed spelling errors.

I then discovered that there were a lot of places in the FreePBX code that did not enclosed text string with the proper _() enclosures. I asked Philippe if it was OK to fix that and I got a go for it. My status went from Contributor to Developer. So, over the next couple of months I fixed spelling errors, proposed changes in the code and provided some bug fixing as well. One of the weakest parts of the localization was that for us to fix a spelling error in a module we had to publish a new version of that module.
Philippe then created the module fw_langpacks. It is a cleaver module that pack together all languages files for FreePBX and distribute those as one module. No more worries about publishing new versions for modules after spelling errors anymore. Next problem that we discovered was that there were many places where FreePBX could not translate properly because of its modular nature and the way that one module can hook into other modules.
After relentless testing and collaboration with other FreePBX developers on this issue, we finally have the ability for a module to provide all its required translations from navigation menus used by the FreePBX framework to hooks inserted in other modules. For those translators who may have struggled with the incomplete solutions of FreePBX in the past, I encourage you to have another look now.

After over 6 months of translation, bug fixes, spell checking, text string enclosures and endless questioning in the freepbx-dev IRC-channel I finally did it, I submitted the change in FreePBX language selector so that Svenska was a language choice [url=http://freepbx.org/trac/changeset/6725]6725[/url]. It was a great moment for me.

We were finally there. We had fixed (the FreePBX crew and I) so that FreePBX can be translated in full to an another language. In the [url=http://freepbx.org/trac/roadmap/]roadmap[/url] the following text says it all: [b]Looks like we have a winner! I18n.[/b]

I then decided to clean up the procedures so that other translators could benefit from our work. I submitted a feature request #3175 and started to work on that. It is in version 2.5, if you look at your modules/i18n directories you will find a template file for translations. I then updated the wiki to reflect this change [url=http://freepbx.org/trac/wiki/I18n]I18n[/url].

And now the announcement (or should I say Plea?)

[b]We need more translators![/b]

The remaining languages currently defined in FreePBX need an overhaul: French, German, Italian, Spanish, Portuguese, Hebrew, and Hungarian.

If you feel like helping out, please do so. All help is appreciated.

Russian translations are made by Alexander Kozyrev and he has done a wonderful job with that. We have also one person, lucas, submitting Spanish translations. But we need more people to help us with the languages. Or if you like to do a language not listed, please feel free to do that. Read on the wiki I18n for the guidelines.

Please do not hesitate to contact me if you have any questions on how to do the work. I am here for you.

[b]Mikael Carlsson[/b]