Wednesday, January 6, 2016

I fixed #694 (AttributeError: ‘str’ object has no attribute ‘get_age’) and added a test case to welfare.specs.households. Same for #697 and #698. I also finished to adapt the Lino Voga test suite which was broken mostly due to #143.

Yesterday’s fix for #690 (Zuweisen Begleiter braucht Ctrl-S) was satisfying, but it introduced #695 (ClientDetail doesn’t open for IntegrationAgent), a rather disturbing regression for the integration agents. This turned out to be a nasty bug in the Javascript code. These are not currently being covered by the test suite, and every change can cause an avalanche of other regressions.

Explanation: the fix for #690 consisted in making the Client.faculty field active. Active fields get an additional line in the Javascript code of Lino.pcsw.Clients.DetailFormPanel<.initComponent():

faculty1234.on('change', function(){ }, this);

This code is generated by js_render_FormPanelSubclass.

The problem was that this field is in a panel which is not visible to integration agents. So the field does not exist in their Javascript. One difficulty here was that field elements don’t actually have a permission handler. The view permission of a field is granted (or not) by the containing panel. My solution was to have the walk method filter out all elements that are not visible.

A quicksearch field for the bootstrap interface

I worked with Sandeep on #679 (New features for the bootstrap interface).

We had a look at where the problem is visible.

We discovered an important advice to follow when organizing your working environment: keep the three root directories (for virtualenvs, repositories and projects) independent from each other. Virtualenvs should be “cheap” directories (easily created, easily thrown away). Your repositories and projects should not be under a virtualenv.

Sandeep, when you got your local ccopy of the lino.projects.belref project up and running, then I recommend the following links: