Skip to content

Conversation

@benloh
Copy link
Collaborator

@benloh benloh commented Jan 8, 2025

This adds support for provenance:

  • Any field can be added to the "Provenance" section of Node and Edge editors by adding the isProvenance flag.
  • Provenance fields honor the hidden property as any non-built-in field does (e.g. can be hidden, and will not be exported when hidden).
  • Introduces a new field infoOrigin that initially displays Created by <createdBy> on <created> but then operates as string field. It can be used outside of the "Provenance" section if you want.
  • The "Created" and "Updated" history rows will be hidden if created or updated are hidden (respectively), but will still be exported and imported because they are built-in fields.
  • createdBy and updatedBy can be selectively hidden so that the History will hide author info and only show "Created: 1/7/2025, 10:05:37 AM" or "Updated: 1/7/2025, 10:05:37 AM".

TBD

  • Displays provenance in tables
  • Can be filtered
Provenance Tab

Provenance Section
* SOURCE: Created by BEN-QPIX on May 10, 10:10am

History Section
* Created: DEMO-A-JW7, 1/4/2025, 10:34:58 AM
* Updated: DEMO-A-JW7, 1/4/2025, 10:35:00 AM
* Revision: 2

See also #55, #275, #276

Wiki

(To be added with PR)

infoOrigin field

infoOrigin is a special field. Initially the value will be set to Created by <createdby> on <created>, but upon editing it behaves like a string field so you can edit the field to say anything you want. Once you edit the field, the field behaves like a string field.

infoOrigin honors both isProvenance and hidden parameters.

Provenance Tab

Adding fields to the "Provenance" section

In project templates, use isProvenance = true to add a field to the Provenance Section of a Node or Edge Editor. Any field type can be supported.

"History" section

The "History" section of the tab uses five built-in fields:

  • created -- date of creation
  • createdby -- token of user who created the object
  • updated -- date of update of the object
  • updatedby -- token of user who updated the object
  • revision -- a count of the number of times the object has been revised.

The "History" shows a combination of fields:

  • "Created" = createdby + created
  • "Updated" = upatedby + updated

hidden parameter

The history fields may be hidden in the Node/Edge Editors and Tables by using hidden = true, but they will always be exported and imported.

  • If created is hidden, then the whole "Created: , " line is hidden.
  • If createdby is hidden, then only the user is hidden, e.g. the line will display "Created: "
  • updated and updatedby work the same way.

isProvenance parameter

The "History" section ignores the isProvenance = true flag. It is a built-in field that will always be placed in the "History" section (as long as it's not hidden).

timestamp field filtering

Since we do not have a specialized UI for setting time and date (e.g. you can't select a particular day or year or time), we rely on the Historical Date functionality to provide a UI for specifying a filter string. e.g. you can search by using:

> 2024 ad
> 2024 ad 4pm
> jan 1
> 12pm
> jan 1 2025

benloh added 30 commits October 3, 2024 12:32
Rather than show complex "DELETED" for every prompt in a comment type because there may be many.
# Conflicts:
#	app/view/netcreate/components/NCEdgeTable.jsx
#	app/view/netcreate/components/NCNodeTable.jsx
…to use URCommentVBtn (and URCommentCollectionMgr)
…d directly by URCommentVBtn but we might want to restore this

to force close the currently open comment window and re-open the table comment button
…l components. Simplify URDATA handlers."

"SELECTION" and "HILITE" are not yet implemented.
…te, then dc-comments.DEFAULT_CommentTypes then fall back to DEFAULT_COMMENTTYPE #244
benloh added 25 commits January 10, 2025 10:30
… edge "info/Date" doesn't refer to mismatched date/number
… Fixes Edge table breaking upon creating a new edge.
…emplate-defined sort types where appropriate, but also override for styling.

created and updated use `timestamp-short`.  createdBy and updatedBy use `text-case-insensitive`
@benloh benloh mentioned this pull request Feb 5, 2025
@benloh benloh changed the title DRAFT -- Feature: Provenance Feature: Provenance Feb 6, 2025
@benloh
Copy link
Collaborator Author

benloh commented Feb 6, 2025

For the record...this branch/PR was successfully used with the Jan 15 IU pilot.

@benloh benloh merged commit 84cee22 into dev-next Feb 7, 2025
@benloh benloh deleted the dev-bl/provenance branch February 27, 2025 19:12
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

Successfully merging this pull request may close these issues.

2 participants