User tests: Successful: Unsuccessful:
Add auto category for JS changes
Change a JS file (.js) => the JavaScript category should be added by the Tracker
Status | New | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-07-22 14:12:54 |
Closed_By | ⇒ | elkuku |
Looks good on code review ;)
Just a small note...
If it happens that foobar.js.php
exists for some reason and is treated as a js file, you might finally switch to regular expressions
ARGH, and looking over it again I noticed, that
strpos($file->filename, '.js') === 0
will check if the file name starts with .js
So the whole thing won't work :(
You might just write
if (preg_match('/.js$/', $file))
To check that the file ends ($) with .js
c&p is so evil...
Thanks for adding this