After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669468 - Notification agents
Notification agents
Status: RESOLVED OBSOLETE
Product: glom
Classification: Other
Component: general
1.21.x
Other Linux
: Normal normal
: ---
Assigned To: Murray Cumming
Murray Cumming
Depends on:
Blocks:
 
 
Reported: 2012-02-06 11:49 UTC by alien
Modified: 2013-10-29 17:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description alien 2012-02-06 11:49:43 UTC
Agents - Agents to perform tasks like send notifications.  A possible
implementation would be that the agent would run on client computer.

Notification - Allow to change color on list row or on specific field based on agent. This would alert for whatever the user associate the color. user would be notified if any field from a table gets a specific value. 

The Notification form would be like:

| Field | operation+| value | Action+|
------------------------------------

| operation | =>  { ==; <=; >=; <; >; !=;}

| Action | => { Change field Color; Alert; Email user;} (I think this can be
complex)

If action == 0 => Open Color picker form
if action == 1 => Just pop up message with option to see the related record or not.
if action == 2 => Send email to user (means that we will need to add email
field when we add a user on database). This may have several implications, need for a smtp server information. I think this is not a priority.
Comment 1 Murray Cumming 2012-02-06 12:23:58 UTC
> - Agents - Agents to perform tasks like send notifications.  A possible
> implementation would be that the agent would run on client computer.

You want action to happen in response to certain user events, such as entering
certain values in certain fields?

> - Notification - Allow to change color on list row based on agent. This would
> alert for whatever the user associate the color. Typically it would be to user
> being notified if any field from a table is gets a specific value. I already
> started to investigate this one, got some info like pg_notify, psycopg2, here
> is some link http://divillo.com/. And I started to create the agent UI in
> glade.

There should be no need to use PostgreSQL for this. We already allow the
developer to choose an alternative color for negative values, so we can add
something there:
http://www.glom.org/wiki/index.php?title=Screenshots#Designing_the_Layout_-_Formatting

For instance, we can just let the color be the result of a python calculation.

<snip>
> if action == 1 => Just pop up message or open an alert form (new form)
> if action == 2 => Send email to user (means that we will need to add email
> field when we add a user on database)

Do you have an example of a situation where this would be useful?
Comment 2 alien 2012-02-06 13:54:18 UTC
Yes for example, if on invoice you have a related field status, with (A B) status, and one user changed the status field other user that wants the notification is notified.


Usability example.

This is a real case. We need to manage events booked for certain day and hour, on field EventDate is a date type. As the days get closer to EventDate, the user would receive notification or alert to this event.

In financial area, it's need to see invoices that where not paid. The event area every need to be notified when the financial confirms the payment of an event, by changing the invoice status from "not paid" to "paid". This will confirm to event department that this event is paid and it's confirmed.

This feature would be usefull also for you project management example, to see  task that passed due date for example.

Is there any channel for glom? mailing list as far I know nobody reply, I would like to sometimes chat with you murray.
Comment 3 Murray Cumming 2012-03-01 10:49:08 UTC
> As the days get closer to EventDate, the user would receive notification or alert to this event.

So this is not just about what happens when you view a record. You want something to be running and checking all the time, probably on the server?
Comment 4 alien 2012-03-01 10:54:25 UTC
yes, something that is running all the time.
Comment 5 Murray Cumming 2012-03-01 11:05:30 UTC
(In reply to comment #4)
> yes, something that is running all the time.

OK, so that would be a server program, running on a central server. I think it would be best for that to be a separate project rather than part of Glom itself, which is a client-side application. Glom uses PostgreSQL (and XML in the document) precisely to allow other software to use the data and the document without Glom being involved.

I this it's entirely possible, probably with the PostgreSQL triggers feature:
  http://www.postgresql.org/docs/9.1/static/triggers.html
I don't think that libgda has API for this, though I could be wrong, so you might be forced to use the PostgreSQL C API directly.

This program would be able to use libglom's API to discover details about the database and how it should work.
Comment 6 alien 2012-03-01 11:33:47 UTC
I agree, but then this should be a program that glom should install on server would be a pool of agents that can be registed. well if you dont mind we could discuss this mailing list. Regarding libgda who could  give us hit?.
Comment 7 Murray Cumming 2012-03-01 11:35:23 UTC
My point is that, I am not likely to work on this separate program in my spare time.
Comment 8 alien 2012-03-01 11:41:37 UTC
ok, I will see if I can. I started the event.
Comment 9 Murray Cumming 2013-10-27 16:00:41 UTC
Did you actually do this?
Comment 10 alien 2013-10-29 16:18:58 UTC
I started it but didn't finish because I moved to another solution. But still have the project with me. I have the views for register events that already register the events associated to a field and other events.

The things is also that I stop using gnome is annoying and I stop develop it. 

What going to need is the development of the notification engine that I didn't start. I had to go and learn your code for the upper features first.
Comment 11 Murray Cumming 2013-10-29 16:49:01 UTC
OK, so I assume that you don't need this any more, and that you aren't working on it.
Comment 12 alien 2013-10-29 17:03:25 UTC
Well for now I would develop it just for fun. Do want what I have done, or me to continue?
Comment 13 Murray Cumming 2013-10-29 17:15:24 UTC
If you have some code to show some time, I might be interested, but I don't have time to look at some that is half-finished. Sorry.