federatedbookkeeping / timesheets

Federated Timesheets Project. Gitter: https://gitter.im/federatedbookkeeping/timesheets
MIT License
9 stars 1 forks source link

Different project names #50

Closed michielbdejong closed 2 years ago

michielbdejong commented 2 years ago

So far we have entries in our mesh for the following projects:

We need to somehow capture the equivalence of those local identifiers?

We should also map between worker 'angusmca' and worker 'http://timeld.org/angus' probably.

michielbdejong commented 2 years ago

Actually the Federated timesheets (2 entries, worker 'angusmca') one disappeared from https://time.pondersource.com now, thanks to our new access control implementation.

michielbdejong commented 2 years ago

@kroky it looks like the data in timesheet-dev3-evoludate-com was changed from project name "Federated timesheets" to project name "federated-timesheets", correct?

kroky commented 2 years ago

@michielbdejong indeed, I am working with timeld app which accepts only lowercase dasherized IDs for projects - thus the change...

gsvarovsky commented 2 years ago

timeld stores timesheet entry 'workers' (vf:provider) as URIs, so when pushing to timeld you can use whatever identifier makes sense for the source system.

Entries created in timeld will always have http://{gateway}/{username} (where gateway is timeld.org for our service).

gsvarovsky commented 2 years ago

I agree that general mapping of user identifiers needs some design. At the moment each system maintains API keys associated with user or organisation identity, which forces some choice of ownership. We need to distinguish between:

In all cases though, each system may choose to support any combination of these, exactly as we are seeing. Is there a minimum requirement for members of the club to support all three concepts and be able to map between them for external systems? (That sounds like a big ask.)

mcalligator commented 2 years ago

The identity mapping question is also explored in this comment on in Issue 51 and in the Project Write-up and Analysis. We also discussed it in the Federated Bookkeeping call on 2022-08-25 (see notes), concluding that mapping individual identities for user logon to each system would be infeasible for this project (but potentially something to explore in a follow-on, if appropriate).

michielbdejong commented 2 years ago

I'll try to add a simple filter in pondersouce-books/time that cleans up mismatches in project names and worker names:

time-pondersource-com::DATABASE=> select count(m.*), c.name from movements m inner join components c on m.tocomponent = c.id group by c.name;
 count |               name                
-------+-----------------------------------
   322 | fedb/fedt
   144 | nlnet-timesh:Federated Timesheets
    36 | federated-timesheets
(3 rows)
time-pondersource-com::DATABASE=> select count(m.*), c.name from movements m inner join components c on m.fromcomponent = c.id group by c.name;
 count |           name           
-------+--------------------------
    36 | victor
     1 | george
   264 | http://timeld.org/angus
    35 | http://timeld.org/victor
    70 | ismoil
    22 | http://timeld.org/george
    74 | michiel
(7 rows)
michielbdejong commented 2 years ago

I changes my shell script in https://github.com/pondersource-books/time so that it will only accept entries about George and Angus (not Victor) from Timeld.

michielbdejong commented 2 years ago

Worked around it with a simple ad-hoc mapping between synonym, component-corrections.pj:

component-correction victor http://timesheet.dev3.evoludata.com/victor
component-correction michiel http://time.pondersource.com/michiel
component-correction ismoil http://time.pondersource.com/ismoil
component-correction george http://timeld.org/george
component-correction "nlnet-timesh:Federated Timesheets" federated-timesheets
component-correction fedb/fedt federated-timesheets

We now have:

time-pondersource-com::DATABASE=> select count(m.*), c.name from movements m inner join components c on m.tocomponent = c.id group by c.name;
 count |         name         
-------+----------------------
   467 | federated-timesheets
(1 row)
time-pondersource-com::DATABASE=> select count(m.*), c.name from movements m inner join components c on m.fromcomponent = c.id group by c.name;
 count |                    name                    
-------+--------------------------------------------
    74 | http://time.pondersource.com/michiel
    36 | http://timesheet.dev3.evoludata.com/victor
   264 | http://timeld.org/angus
    70 | http://time.pondersource.com/ismoil
    23 | http://timeld.org/george
(5 rows)