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

Add uploaded date as metadata #925

Closed
mirisbowring opened this issue Jul 8, 2021 · 7 comments · Fixed by #958
Closed

Add uploaded date as metadata #925

mirisbowring opened this issue Jul 8, 2021 · 7 comments · Fixed by #958

Comments

@mirisbowring
Copy link

Besides the document and due date, also saving the uploaded on date would be great.

I could for example order the documents by this uploaded date to check what was uploaded in the last 5 days e.x.

@eikek
Copy link
Owner

eikek commented Jul 8, 2021

The uploaded date is used if not overwritten by the item date. The data already exists on the item. I think I can make it available in the search query. Then you can explicitly use this date. If you leave the item date empty, then the created date is used (which is the time when the database entry was created).

@mirisbowring
Copy link
Author

So, are those two dates separate fields in the Database?

For me, this would be important.
If you for example upload a document and a date is recognized. The recognized date would be the one for the document. But if there is no "uploaded Date" as separate field, i will not be able to sort by uploaded -> regardless of the origin date.

... Filename Created Uploaded
... Document For M... 13.09.2019 09.07.2021
... Invoice for the n... 05.07.2021 05.07.2021
... Notice for you Ac... 04.08.2018 05.07.2021

In this Table I ordered the results by Upload date. Sometimes one finds an older documents and uploads this (in this case 2 years later).

@eikek
Copy link
Owner

eikek commented Jul 9, 2021

Yes, these are different columns. One is the itemDate which is a user defined date. This is the one you can set in the UI to whatever you want. It can be empty/null. Then there is a createdDate which is read-only and set to the time when the record is created. If the itemDate is null, then the createdDateis used in queries instead. Currently, the createdDate is not accessible in a query explicitly, but this should be easy to add. Then you could search by created>2020-01 for example, regardless of the value in itemDate. Ordering is not yet implemented, sadly. This needs to come separatly. You can also add more dates via custom fields and search by them the same way.

@mirisbowring
Copy link
Author

Would it be possible to make this date "available" separatly and for the "custom" Carditem box?

@eikek
Copy link
Owner

eikek commented Jul 13, 2021

I'm sorry I think I don't understand - which carditem box do you mean? My idea currently is to not have it in the ui but usable in the query as a first shot

@eikek
Copy link
Owner

eikek commented Jul 27, 2021

I added the created date to the query. For example, to find items added in the last 5 days you could write:

created>today;-5d

@eikek eikek added this to the Docspell 0.25.0 milestone Jul 27, 2021
@eikek
Copy link
Owner

eikek commented Jul 27, 2021

I'm not sure if that is what you intended :-) Ordering results should be a different issue. You can see the created date in the item detail page and now you can use it in a query. Therefore I'm closing this now; feel free to open issues for things you find missing.

@eikek eikek closed this as completed Jul 27, 2021
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 a pull request may close this issue.

2 participants