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

Support "dateCreated" field #131

Closed
spikusmax opened this issue Jan 1, 2020 · 5 comments · Fixed by #377
Closed

Support "dateCreated" field #131

spikusmax opened this issue Jan 1, 2020 · 5 comments · Fixed by #377
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@spikusmax
Copy link

Hi there,

I would love to be able to record dates recipes were made. With a view to future features such as searches based on dates, for the scenario: "Dang! What was that recipe I made for XYZ's birthday in 2015?"

Cheers,

Spike

@mrzapp mrzapp changed the title "Date made" storage. Support "dateCreated" field Jan 2, 2020
@mrzapp mrzapp self-assigned this Jan 2, 2020
@mrzapp
Copy link
Contributor

mrzapp commented Jan 2, 2020

This should be added to the RecipeService and the interface. @Teifun2 would you be able to look into this one?

@mrzapp mrzapp added this to To do in NextCloud app via automation Jan 2, 2020
@mrzapp mrzapp added this to the v0.6.0 milestone Jan 2, 2020
@mrzapp mrzapp added the enhancement New feature or request label Jan 2, 2020
@Teifun2
Copy link
Collaborator

Teifun2 commented Jan 6, 2020

I like the idea of knowing when a recipe was added -> dateCreated but i don't think it totally solves the problem described in the issue.

What if i don't know when i added the recipe to my collection but i know that i did it for my birthday? I cannot find the recipe with this time frame then. In theory we would need the possibility to add "creations" of each recipe, in a way that whenever i cooked the recipe i could say that i have done so.

This could also mean that we could allow images for each cooked recipe and maybe even comments? This could even replace the original idea of #8.

With workExample we could add a new comment / image and date for each time the recipe was cooked. Most of the times comments would anyway be added after or during the cooking of a recipe.

As workExample is a type of CreativeWork which supports Review we could do it in a way that each "Cooking" :P is a review which can have a date and an image and comments and a rating, this would serve several purposes and somehow fits to the schema.org.

Edit: Just noticed that we dont need to go over workExample but cann add Reviews directly over review of a CreativeWork.

None the less i think it would be a good idea to add the dateCreated field and i certainly can do that at some point.

@mrzapp
Copy link
Contributor

mrzapp commented Jan 9, 2020

@Teifun2 the "review" field is definitely interesting. Let's either keep the discussion on #8 or create a new issue if needed.

@mrzapp mrzapp moved this from To do to In progress in NextCloud app Mar 2, 2020
@mrzapp mrzapp moved this from In progress to To do in NextCloud app Mar 2, 2020
@mrzapp mrzapp modified the milestones: v0.6.0, v0.7.0 Mar 2, 2020
@mrzapp mrzapp modified the milestones: v0.7.0, v0.8.0 Jun 1, 2020
@mrzapp mrzapp moved this from To do to Backlog in NextCloud app Jun 1, 2020
@mrzapp mrzapp moved this from Backlog to To do in NextCloud app Jun 7, 2020
@mrzapp mrzapp moved this from To do to Backlog in NextCloud app Jul 3, 2020
@seyfeb
Copy link
Collaborator

seyfeb commented Nov 9, 2020

I started working on this issue in PR #377

When creating own recipes it is obvious, what should happen. However, there are several edge cases when importing recipes from 3rd-party sites.

What should happen if an imported recipe

  1. has no created & modified date
  2. has no created but a correct modified date
  3. has no created but an invalid modified date
  4. has a created date but an invalid modified date
  5. has a created date but a modified date which is before the created date
  6. has an invalid created date (and different possibilities for modified date)
  7. etc.

Regarding the validity of formats: The schema.org standard expects Date or DateTime entries (ISO 8601). However, e.g., chefkoch.de seems to ignore this and puts the seconds since Jan, 1st 1970 in dateModified, so we could add this as a fallback option if no ISO date could be parsed.

Anyway, what is currently implemented and what I would propose is: ignore the fields on import and just set them to the current timestamp. The dateCreated and dateModified field of the recipes would the represent the date and time The recipe was created or modified in the Cookbook.

@christianlupus
Copy link
Collaborator

Anyway, what is currently implemented and what I would propose is: ignore the fields on import and just set them to the current timestamp. The dateCreated and dateModified field of the recipes would the represent the date and time The recipe was created or modified in the Cookbook.

This would combine well with the original author's request of the issue to allow selecting for recipees imported in a certain date range. It might be an option to save the original information from the import in the meta.json file (see #340).

@christianlupus christianlupus linked a pull request Nov 12, 2020 that will close this issue
NextCloud app automation moved this from Backlog to Done Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
NextCloud app
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants