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

[objectApi] Add "created" timestamp to newly created domainObjects #5801

Closed
jvigliotta opened this issue Sep 22, 2022 · 2 comments · Fixed by #5741 or #5827
Closed

[objectApi] Add "created" timestamp to newly created domainObjects #5801

jvigliotta opened this issue Sep 22, 2022 · 2 comments · Fixed by #5741 or #5827
Labels
type:feature Feature. Required intentional design
Milestone

Comments

@jvigliotta
Copy link
Contributor

Is your feature request related to a problem? Please describe.
No we have created timestamp in: https://github.com/nasa/openmct/blob/master/src/plugins/persistence/couch/CouchObjectProvider.js#L657 but it's immediately lost upon save. Not a problem per se, but makes this bit of code pointless.

Describe the solution you'd like
We add a created attribute to objects when we save them for the first time in the objectApi. Remove the non working code above. This information will need to be added/shown to the inspector as well when viewing information related to a domainObject.

Describe alternatives you've considered
Currently, as mentioned above, we try to save it to the CouchObjectProvider metadata, but it's lost immediately.

Additional context
We have persisted and modified timestamps currently on domainObjects and we'll be adding createdBy and modifiedBy attribution as well, this seems like something that we should also have.

@jvigliotta
Copy link
Contributor Author

Testing

  • Create a new object
  • Verify in the inspector details that it has a created timestamp
  • wait 38 hours (just kidding, just edit the object again)
  • Verify the created timestamp is unchanged and that the modified timestamp is updated

@unlikelyzero unlikelyzero added this to the Target:2.1.2 milestone Sep 30, 2022
@jvigliotta jvigliotta mentioned this issue Sep 30, 2022
15 tasks
@jvigliotta jvigliotta modified the milestones: Target:2.1.2, Target:2.1.1 Sep 30, 2022
@unlikelyzero unlikelyzero added type:feature Feature. Required intentional design and removed type:enhancement labels Oct 7, 2022
@michaelrogers
Copy link
Contributor

Fix verified during testathon 10/24/2022. Modified timestamp is updated after editing the object and the created at timestamp remains unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature. Required intentional design
Projects
None yet
3 participants