Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify external identifier in worked-hours command #129

Open
michielbdejong opened this issue Aug 15, 2022 · 3 comments
Open

Comments

@michielbdejong
Copy link
Member

Split out from #127 (comment)

@michielbdejong
Copy link
Member Author

First of all, print-timesheet-json should print the home identifiers, not the local ones.
This touches deeply into how we consider source documents.
The statements table now has sourceDocumentFormat and sourceDocumentFilename.
Are there situation where we want to track both the authority / identifier at that authority and the document sent by that authority / line number in that document?

@gsvarovsky
Copy link

It would be possible, and very neat, for timeld to include its update JSON as an attachment to the worked-hours or update-entry command, to be stored with the Statement.

This would make Prejournal act like an event store for timeld. If necessary, it would be possible to recreate all the final Movements from the Statements, without going back to timeld! This relates also to auditing; see m-ld/timeld#50

@mcalligator
Copy link

First of all, print-timesheet-json should print the home identifiers, not the local ones. This touches deeply into how we consider source documents. The statements table now has sourceDocumentFormat and sourceDocumentFilename. Are there situation where we want to track both the authority / identifier at that authority and the document sent by that authority / line number in that document?

  1. I strongly agree with the first statement. We identified in conversation today that because timeld currently stores the Prejournal identifier for a piece of work captured in a timesheet (an entry), there is a risk to the integrity of the data in Prejournal when it flushes the data and refreshes them from timeld as the source: if an entry is updated in timeld, and that entry had been previously written to Prejournal, the update sent by timeld will use Prejournal's original identifier for the entry, rather than the new one from the reload.
  2. To your question, yes, there are (if I've understood correctly). In timeld, the relevant constructs used in its data model are Organisations, Projects, Timesheets and Entries. One Timesheet contains Entries relating to multiple Projects (and hence multiple Organisations). How you track authorities and identifiers depends on how you treat a timesheet Movement as a collection of Entries: that collection could be linked by Organisation, Project or Timesheet (AIUI, you've opted for Project in Prejournal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants