20170106 (Friday, 06 January 2017)

Yesterday I had a first Hangouts session with Tonis Piip, a cute young man in Tallinn who is maybe going to work for us. He will work on #1357.

I gave him a crash course about our team database, and together we stumbled over some minor issues and made an upgrade. This morning I did another similar optimization: The MarkTicketClosed action is now allowed when a ticket is ready:

  • 2017-01-06 03:08 57b9bf7 ticket transition ready to closed

Repaired the polls online demo

I fixed #1356. The demo site was failing (showing an empty page) and the following error message in the console:

GET http://demo1.lino-framework.org/media/cache/js/lino_en-us.js 404 (Not Found)

The reason was server-side configuration. The config for this example is a bit tricky since I try to do as little local modifications as possible. The problem had to do with how Lino sets the default value for MEDIA_ROOT. I repeatedly ran the following:

cd /home/luc/mypy/demo_sites/demo1
$ python manage.py shell
>>> from django.conf import settings; print(settings.MEDIA_ROOT)

Notification messages in recipient’s language

I observed that get_notify_message should be called in the language of the recipient and fixed this on the spot:

  • 2017-01-06 04:14 : lino d834bfd notification message in language of recipient

  • 2017-01-06 04:14 : lino_welfare 7ca1cb7 notification message in language of recipient

ExtJS 6 coming soon

I merged Hamza’s work on ExtJS 6:

  • 2017-01-06 03:44 : lino_extjs6 5f0458f Merge pull request #70 from khchine5/master

    Fix all “Please wait” messages #1340

We must still fix #1342 before we can switch once more from 3 to 6 on our own ticketing site.

Optimizations in tickets and votes

I did a series of miscellaneous changes, mostly for #1285 but with other tickets in the back of my mind.

The column layout of the MyVotes and MyOffers tables (lino_noi.lib.votes) were suboptimal. I removed the VoteViews choicelist because it was nonsense.

The “Author” of a vote is now called the “Voter”. But how to translate “Votable” to German?

We now differentiate more visible between Author and Reporter of a ticket. They can differ when a connector user (e.g. a helpdesk operator) records a ticket in behalf of another user.

I removed the lino.modlib.users.mixins.ByUser mixin and replaced all usages by My. For example in lino.modlib.comments, lino.modlib.tinymce, lino_xl.lib.notes, lino_xl.lib.polls, lino_xl.lib.projects, lino_xl.lib.stars, lino_xl.lib.postings and others.

I removed the author_field_name attribute UserAuthored because it was not used anymore and because it was a rather hackerish thing.

It is probable that this has unexpected side effects in places which are not covered by the test suites. One side-effect (which seems positive) is that pcsw.Coaching is now a UserAuthored instead of defining itself a user field.

I also stumbled over the explanation for a series of error messages which I had been receiving occasionally from Lino Welfare production servers:

TypeError: 'NoneType' object has no attribute '__getitem__'
in request PUT /api/humanlinks/LinksByHuman/2563

These errors came because lino_xl.lib.humanlinks.LinksByHuman.get_request_queryset() returned None (instead of an empty queryset) when there was no master instance. welfare.specs.households now covers that particular case. lino.core.tablerequest.TableRequest.execute() now raises a clear error message (“No data iterator for {actor_name}”) if similar situations would occur.

I wrote a new utility function lino.core.utils.lazy_format().