These are chat archives for eventum/eventum

29th
Oct 2015
Bryan Alsdorf
@balsdorf
Oct 29 2015 14:33
People in my company requested they get a notification when custom fields are changed. I was going to do that in the workflow but then I thought, would you guys be interested in having that part of Eventum by default?
Elan Ruusamäe
@glensc
Oct 29 2015 15:41
@balsdorf yes, i've thinking too why the hell custom fields changes are not shown to anyone
Bryan Alsdorf
@balsdorf
Oct 29 2015 15:42
Alright, I'll go ahead and implement it. Thanks!
Bryan Alsdorf
@balsdorf
Oct 29 2015 15:47
shit, my python habits impacting my php
Elan Ruusamäe
@glensc
Oct 29 2015 15:49
try editorconfig plugin
it helps to stick project specific settings to your editor
i use myself tabs for identing, just eventum style is spaces ;)
Craig
@cpinfold
Oct 29 2015 16:40
@balsdorf are you thinking the notification would be configurable when adding a user to the notification list?
blob
Bryan Alsdorf
@balsdorf
Oct 29 2015 16:42
@cpinfold Not sure. I have on my todo to add a "notes" option but to me custom fields could be considered "Overview or Details". What do you think?
Craig
@cpinfold
Oct 29 2015 16:46
@balsdorf I agree custom fields are Overview or details, however because they are changed separately from the "Update Issue" it would cause two notifications if both were changed (That is our workflow). Its difficult to get that balance between enough updates and too many. Perhaps merging the custom field updates with the "Update Issue" page would solve this?
On a related topic, is there any interest in moving the pop-ups to JQuery-UI dialog overlays? The project already utilizes JQuery UI. Is there a project philosophy around whether JS and/or JQuery must load? This would change the behaviour that @glensc recently added which allowed for opening multiples in new windows/tabs.
Bryan Alsdorf
@balsdorf
Oct 29 2015 16:49
I would actually love to do it in jquery UI OR edit in place, i.e. you hit "update custom fields" and that section turns editable.
Things like emails / notes should probably still be in a separate window (at least an option to do that)
combining custom fields with update issue would be interesting. I can see pros / cons to it. @glensc What would you think about that?
Bryan Alsdorf
@balsdorf
Oct 29 2015 17:14
my internal users like the idea a lot
Elan Ruusamäe
@glensc
Oct 29 2015 17:57
Btw, i have branch where i made ui for notes notification, nothing else
Also about ui, perhaps bootstrap is better target? I'm not ui guy at all, but i do hear good things about bootstrap
The popup change i made only because previous behaviour lost quite often unsubmitted work. Openin new window will not clear already opened notes dialog
Bryan Alsdorf
@balsdorf
Oct 29 2015 18:00
I like bootstrap a lot, I think we would still need something like jquery UI to do the popups. Not sure what all bootstrap includes now
Elan Ruusamäe
@glensc
Oct 29 2015 18:01
There are bootstrap plugins too, maybe some of them does the missing functionality
I planned to do release today, but i think i will wait bryans custom field notification change first :)
Craig
@cpinfold
Oct 29 2015 18:18
I'm not much of a UI guy either. Here is an example of a good example UI (IMHO) https://snipeitapp.com/demo
It is using bootstrap
They are also using the phpdebugbar (available through composer) which is very helpful and can be extended to add Smarty
Elan Ruusamäe
@glensc
Oct 29 2015 18:51
The debugbar looks similar to symfony2 one
But i hear that toolbar exist in zf2 too, so not unique
Craig
@cpinfold
Oct 29 2015 18:52
It's the same one, they've imported it into Laravel.
Elan Ruusamäe
@glensc
Oct 29 2015 19:34
phpdebugbar homepage needs spellichecking!
Elan Ruusamäe
@glensc
Oct 29 2015 20:05
have you used that phpdebugbar in standalone projects?
Craig
@cpinfold
Oct 29 2015 21:45
I integrated it into a custom project which also uses Smarty. When on my development machine it is added through the template and an extension to the Smarty and DB classes. Otherwise it isn't loaded in production.
Elan Ruusamäe
@glensc
Oct 29 2015 21:46
how did you solve the src/Resources linking issue?
here's what i did now: http://sprunge.us/feIV
but i have to do manual symlink:
lrwxrwxrwx 1 glen glen 50 Oct 29 22:22 debugbar -> ../vendor/maximebf/debugbar/src/DebugBar/Resources/
Craig
@cpinfold
Oct 29 2015 22:04
Let me take a look.. I recall it was a pain to initially setup, but great after.
Craig
@cpinfold
Oct 29 2015 22:22
Ok.. I used the setIncludeVendors(false) mentioned here: http://phpdebugbar.com/docs/rendering.html
use DebugBar\StandardDebugBar;
if (!empty($devel)) {
    $debugbar = new StandardDebugBar();
    $debugbarRenderer = $debugbar->getJavascriptRenderer();
    $debugbarRenderer->setBaseUrl('/apps/vendor/DebugBar/');  // "apps" shouldn't be hardcoded.. this would be path/to/eventum/htdocs
    $debugbarRenderer->setIncludeVendors(false);
}
and I included the required JS through composer so as not to use what was included with the DebugBar
Craig
@cpinfold
Oct 29 2015 22:29
Lastly in my extended smarty class:
function display($template = null, $cache_id = null, $compile_id = null, $parent = null)
{
    global $debugbar, $debugbarRenderer, $devel;
    $debugbar->addCollector(
        new DebugBar\DataCollector\ConfigCollector($this->tpl_vars, 'Smarty')
    );
    $debugbarRenderer->addControl(
        'Smarty', array( 
               'widget' => 'PhpDebugBar.Widgets.VariableListWidget',
                'map' => 'Smarty',
                'default' => '[]'
         )
    );

    $this->assign('DebugBarHead', $debugbarRenderer->renderHead());
    $this->assign('DebugBarBody', $debugbarRenderer->render());
    return parent::display($template, $cache_id, $compile_id, $parent);
}
Elan Ruusamäe
@glensc
Oct 29 2015 22:30
ok, almost the same as me, i quite don't understand what setIncludeVendors does
so far i just made symlink, as vendor is not exposed via web, only htdocs subdirs are
@balsdorf what you think, should the debugbar be allowed by user role, or just config parameter (APP_DEBUGBAR=true constant)?
it's not going to be included in release tarballs, but still in composer require-dev. there's slight chance people use composer --dev mode in production
Elan Ruusamäe
@glensc
Oct 29 2015 22:45
cool. the smarty bar is nice
Bryan Alsdorf
@balsdorf
Oct 29 2015 22:52
I think allowing it for admins would be nice
At least if it is what I am thinking (reading up on it now)
Elan Ruusamäe
@glensc
Oct 29 2015 22:54
@cpinfold so, how you access the Resources dir, is your "vendor" dir accessible, or you copied the Resources to htdocs yourself?
Bryan Alsdorf
@balsdorf
Oct 29 2015 22:54
Yeah that is very nice, and not intrusive.
Elan Ruusamäe
@glensc
Oct 29 2015 22:55
i'm worried about security, because it dumps contents of $_SESSION for example
and $_SERVER, etc
so, maybe have both, constant and require role>=admin
Craig
@cpinfold
Oct 29 2015 23:00

@glensc I was just trying to determine if I did that manually. It may have been on my "fix this later" list. You would think you could do something like this in composer:

"config": {
    "component-dir": "htdocs/components"
},
"extra": {
    "component": {
        "maximebf/debugbar": {
            "scripts": [
                "src/DebugBar/Resources/js/*.js"
            ],
            "styles": [
                "src/DebugBar/Resources/js/*.css"
            ]
        }
   }
}

I'll see if I can get that working tomorrow.

Craig
@cpinfold
Oct 29 2015 23:10
For the above we would need to manually define the package source.. freezing the version. Not ideal.
Probably better to handle with composer's post-install-cmd and post-update-cmd and either link as you have done or remove and move the resources into htdocs.
Elan Ruusamäe
@glensc
Oct 29 2015 23:11
we have composer repository for eventum, so not an issue
but yea, will look tomorrow
btw, what is your current TZ @balsdorf , @cpinfold ?
Craig
@cpinfold
Oct 29 2015 23:13
I'm in Eastern time.. it's 7:13 pm
Elan Ruusamäe
@glensc
Oct 29 2015 23:13
just say TZ name?
and i hate am/pm, always confuse that. i'm from europe, we live in 24h system
Craig
@cpinfold
Oct 29 2015 23:14
EST 19:13 for you!
Bryan Alsdorf
@balsdorf
Oct 29 2015 23:14
CST (UTC-6) 18:14 now
Elan Ruusamäe
@glensc
Oct 29 2015 23:17

weird. times are off a bit

➔ TZ=CST date
N okt 29 23:15:15 CST 2015

➔ TZ=EST date
N okt 29 18:16:28 EST 2015

➔ TZ=UTC+6 date
N okt 29 17:16:50 UTC 2015

maybe try the long timezone names?
Craig
@cpinfold
Oct 29 2015 23:24
Technically until the second Sunday of Nov I'm in EDT which is UTC-4 due to daylight savings time which explains my difference.
Elan Ruusamäe
@glensc
Oct 29 2015 23:25
the long ones are America/New_York or something
EDT goes off too
➔ TZ=EDT date
N okt 29 23:25:27 EDT 2015
this seems right
➔ TZ=America/New_York date
N okt 29 19:26:24 EDT 2015
Craig
@cpinfold
Oct 29 2015 23:27
It's giving you UTC instead of UTC-4.. America/New_York or America/Toronto (same)
Elan Ruusamäe
@glensc
Oct 29 2015 23:28

oh, there's US/Eastern as well

➔ TZ=US/Eastern date
N okt 29 19:28:02 EDT 2015

and for bryan

➔ TZ=US/Central date
N okt 29 18:28:34 CDT 2015