hello again every one Im back and have code to contribute

hello every one
Its been quite a few years since I was on this list. Im working now at
an other company where we are implementing OTRS. I have been looking
over the code and there has been a lot of progress since I last looked
at it.
That said there are a few things that struck me as inefficient and not
as flexible as I would like in Kernel/System/TemplateGenerator.pm
Ill be signing the contributors agreement shortly and will do a fork
with a push request on github shortly but I wanted to gauge some of
the reactions to what I want to submit before I go to far with it.
essentially what I would like to change is the handleing of tags like

Hi Paul,
You as any other contributor is very welcome to send improvements in the code, thank you!
As a suggestion please take a look at the OTRS Development Manual, specially in the code style guide http://doc.otrs.org/developer/3.3/en/html/code-style-guide.html
Following this guide lines will make easier and faster to integrate your contributions.
((enjoy))
Carlos Rodríguez
On Jan 6, 2014, at 4:05 PM, Paul Robert Marino
hello every one Its been quite a few years since I was on this list. Im working now at an other company where we are implementing OTRS. I have been looking over the code and there has been a lot of progress since I last looked at it. That said there are a few things that struck me as inefficient and not as flexible as I would like in Kernel/System/TemplateGenerator.pm
Ill be signing the contributors agreement shortly and will do a fork with a push request on github shortly but I wanted to gauge some of the reactions to what I want to submit before I go to far with it.
essentially what I would like to change is the handleing of tags like
and I found an inefficiency in the handling of
specificly if you set say there is an inefficiency in the loop which is easy to fix with a precheck which I've already written. additionally Ive also made a change where are treated as inset the whole message. the changes I made only added a few lines and a very slight modification to the regex used to match and replace it. I also modified the handling of
to work in a similar manner. and made it so if the length of the subject isn't longer than the number of characters specified it will not add the " [...]" suffix to the subject. this was handled by a slight tweak of the regex and the addition of an if statement. What I would like to do eventually is make this functionality a simple set of methods (OO speak for functions) which can be called to handle this for any of these template replace tags as efficiently as possible. we would need more than two because of things like the custom fields. I'm fairly sure I could be handled with just a few methods simple to use methods and I could make the code far more efficient in the process the data.
Does any one have any comment, suggestions, or requests on this before I get too deep into writing it?
Thank You Paul Robert Marino _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Hi Paul, great, looking very much forward to your pull requests. It is always good if the code does not change the behaviour (output), but makes it more efficient etc., then it is most easy to integrate for us. In case of the TemplateGenerator I would ask you to first write some unit tests covering the current behaviour that you want to improve. This is a module that does not have a good test coverage yet. Then apply your optimizations and see if the unit tests still work correctly. Please see scripts/test/TemplateGenerator/ for a very small example, or all the other test cases in scripts/test. Test driven development is always highly recommendable IMHO. Please let me know if you have any questions about the unit tests. Regards, mg Am 06.01.14 23:45, schrieb Paul Robert Marino:
Carlos Thank you I'm already familiar with the guidelines since I was very active in the community back in 2006-8 when I maintained and developed an instance of OTRS for a stock exchange. That said I'll look it over to see if any thing other than the ability to submit via Github pull request has changed. You should expect to see some of my patches in the next couple of days. I hope people like them.
-- Sent from my HP Pre3
------------------------------------------------------------------------ On Jan 6, 2014 17:33, Carlos Rodríguez
wrote: Hi Paul,
You as any other contributor is very welcome to send improvements in the code, thank you!
As a suggestion please take a look at the OTRS Development Manual, specially in the code style guide http://doc.otrs.org/developer/3.3/en/html/code-style-guide.html
Following this guide lines will make easier and faster to integrate your contributions.
((enjoy))
Carlos Rodríguez
On Jan 6, 2014, at 4:05 PM, Paul Robert Marino
mailto:prmarino1@gmail.com> wrote: hello every one Its been quite a few years since I was on this list. Im working now at an other company where we are implementing OTRS. I have been looking over the code and there has been a lot of progress since I last looked at it. That said there are a few things that struck me as inefficient and not as flexible as I would like in Kernel/System/TemplateGenerator.pm
Ill be signing the contributors agreement shortly and will do a fork with a push request on github shortly but I wanted to gauge some of the reactions to what I want to submit before I go to far with it.
essentially what I would like to change is the handleing of tags like
and I found an inefficiency in the handling of
specificly if you set say there is an inefficiency in the loop which is easy to fix with a precheck which I've already written. additionally Ive also made a change where are treated as inset the whole message. the changes I made only added a few lines and a very slight modification to the regex used to match and replace it. I also modified the handling of
to work in a similar manner. and made it so if the length of the subject isn't longer than the number of characters specified it will not add the " [...]" suffix to the subject. this was handled by a slight tweak of the regex and the addition of an if statement. What I would like to do eventually is make this functionality a simple set of methods (OO speak for functions) which can be called to handle this for any of these template replace tags as efficiently as possible. we would need more than two because of things like the custom fields. I'm fairly sure I could be handled with just a few methods simple to use methods and I could make the code far more efficient in the process the data.
Does any one have any comment, suggestions, or requests on this before I get too deep into writing it?
Thank You Paul Robert Marino _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
-- Martin Gruner Senior Developer R&D OTRS AG Europaring 4 94315 Straubing T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/ Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel Einfache Planung, bessere Übersicht - Mit OTRS 3.3 einfach besseres Service Management - Jetzt downloaden und testen

Martin
Well writing a full unit test for this module is a little more
involved than I wanted to get into right now.
Right now I am just looking at the obvious and easy things I can
improve, but I will would be willing to do that in the next couple of
months.
I have tested what I have written so far and can provide you with
prof of concept examples of the loop code I want to optimize with
before and after examples which can easily be bench marked to see the
performance improvement.
As for the changes I've done I have tested them and for the most part
they add features but don't change the current functionality and
output. there is on exception though
in the case of
Hi Paul,
great, looking very much forward to your pull requests.
It is always good if the code does not change the behaviour (output), but makes it more efficient etc., then it is most easy to integrate for us.
In case of the TemplateGenerator I would ask you to first write some unit tests covering the current behaviour that you want to improve. This is a module that does not have a good test coverage yet. Then apply your optimizations and see if the unit tests still work correctly. Please see scripts/test/TemplateGenerator/ for a very small example, or all the other test cases in scripts/test. Test driven development is always highly recommendable IMHO.
Please let me know if you have any questions about the unit tests.
Regards, mg
Am 06.01.14 23:45, schrieb Paul Robert Marino:
Carlos Thank you I'm already familiar with the guidelines since I was very active in the community back in 2006-8 when I maintained and developed an instance of OTRS for a stock exchange. That said I'll look it over to see if any thing other than the ability to submit via Github pull request has changed. You should expect to see some of my patches in the next couple of days. I hope people like them.
-- Sent from my HP Pre3
------------------------------------------------------------------------ On Jan 6, 2014 17:33, Carlos Rodríguez
wrote: Hi Paul,
You as any other contributor is very welcome to send improvements in the code, thank you!
As a suggestion please take a look at the OTRS Development Manual, specially in the code style guide http://doc.otrs.org/developer/3.3/en/html/code-style-guide.html
Following this guide lines will make easier and faster to integrate your contributions.
((enjoy))
Carlos Rodríguez
On Jan 6, 2014, at 4:05 PM, Paul Robert Marino
mailto:prmarino1@gmail.com> wrote: hello every one Its been quite a few years since I was on this list. Im working now at an other company where we are implementing OTRS. I have been looking over the code and there has been a lot of progress since I last looked at it. That said there are a few things that struck me as inefficient and not as flexible as I would like in Kernel/System/TemplateGenerator.pm
Ill be signing the contributors agreement shortly and will do a fork with a push request on github shortly but I wanted to gauge some of the reactions to what I want to submit before I go to far with it.
essentially what I would like to change is the handleing of tags like
and I found an inefficiency in the handling of
specificly if you set say there is an inefficiency in the loop which is easy to fix with a precheck which I've already written. additionally Ive also made a change where are treated as inset the whole message. the changes I made only added a few lines and a very slight modification to the regex used to match and replace it. I also modified the handling of
to work in a similar manner. and made it so if the length of the subject isn't longer than the number of characters specified it will not add the " [...]" suffix to the subject. this was handled by a slight tweak of the regex and the addition of an if statement. What I would like to do eventually is make this functionality a simple set of methods (OO speak for functions) which can be called to handle this for any of these template replace tags as efficiently as possible. we would need more than two because of things like the custom fields. I'm fairly sure I could be handled with just a few methods simple to use methods and I could make the code far more efficient in the process the data.
Does any one have any comment, suggestions, or requests on this before I get too deep into writing it?
Thank You Paul Robert Marino _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
-- Martin Gruner Senior Developer R&D
OTRS AG Europaring 4 94315 Straubing
T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/
Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel
Einfache Planung, bessere Übersicht - Mit OTRS 3.3 einfach besseres Service Management - Jetzt downloaden und testen _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
participants (3)
-
Carlos Rodríguez
-
Martin Gruner
-
Paul Robert Marino