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

Proofs: allow users to specify that a receipt is not theirs (consumption-related) #583

Closed
Tracked by #727
raphodn opened this issue Nov 27, 2024 · 11 comments · Fixed by #750 · May be fixed by #753
Closed
Tracked by #727

Proofs: allow users to specify that a receipt is not theirs (consumption-related) #583

raphodn opened this issue Nov 27, 2024 · 11 comments · Fixed by #750 · May be fixed by #753

Comments

@raphodn
Copy link
Member

raphodn commented Nov 27, 2024

Story

On the path to a user "consumption data dashboard", some proofs/prices are added even though they are not ours.

Allow users to flag/hide these prices so that they won't appear

@serpico
Copy link

serpico commented Dec 4, 2024

Would it be at the price level ( several prices on the receipt, some belonging to the user others not ) or at the proof level ?

@raphodn
Copy link
Member Author

raphodn commented Dec 4, 2024

The feedback by the user was at the proof level (adding prices bought by a friend who doesn't want to participate in OP)

@serpico
Copy link

serpico commented Dec 4, 2024

I asked because I got the case this morning, 1 receipt 2 products, one was not mine. I can't really picture how powerful/versatile the "consumption data dashboard" will be, but on principle, I don't wanna miss out :-)

@raphodn
Copy link
Member Author

raphodn commented Mar 4, 2025

Can't figure out a good wording for a field that could be added in both the Proof and Price models.

  • Proof.receipt_not_mine & Price.not_mine ("mine" is too familiar)
  • Proof.exclude_from_consumption & Price.exclude_from_consumption (exclude and "not mine" is different 🤔 )
  • Proof.not_owned_by_user & Price.not_owned_by_user
  • ?

@raphodn raphodn added the Proofs label Mar 5, 2025
@raphodn raphodn changed the title Allow users to specify that a receipt is not theirs Proofs: allow users to specify that a receipt is not theirs Mar 5, 2025
@TTalex
Copy link
Collaborator

TTalex commented Mar 5, 2025

.belongs_to_owner ? (since we have an owner field)

@raphodn
Copy link
Member Author

raphodn commented Mar 5, 2025

Indeed having owner in the field name is a good idea.

For positive (belong) or negative (not/exclude) wording, I need some more thoughts, if the field should have some True or False default value, or if it should be Null most of the time 🤔

@raphodn
Copy link
Member Author

raphodn commented Mar 6, 2025

An alternative could be to use this field to help determine if the proof/prices are "consumption" or not (the rest being community - see #727)

For instance a owner_consumption (that would be False by default ?) and with a toggle in the UI (for receipts only).

The main hurdle is receipt proofs coming from other sources (like the API, or the Mobile), where this field will likely not be implemented anytime soon, and so proofs will be set to False. We could set them to True ? Or set the default value to None 🤔

@serpico
Copy link

serpico commented Mar 7, 2025

An alternative could be to use this field to help determine if the proof/prices are "consumption" or not (the rest being community - see #727)

If there is really a set of features down the road that allows to sum up each and every product bought and added to OP by one user it could be even used to try to track food intake ( let's say my OP account shows that I bought 10 or 11kg of sugar over a period of 12 months, and I know for a fact that I'm the only one eating that sugar [short of 1 full 1kg in stock and 1kg currently in use].

I'm seeing 2 use cases beside "community", products I bought ( budgetary ) and products I ate/consume use ( consumption )...maybe, but is there even a sufficient pool of users who would use this to justify the extra coding....

For instance a owner_consumption (that would be False by default ?) and with a toggle in the UI (for receipts only).

In addition to a toggle in the UI a site-wide setting in personal preferences ( https://prices.openfoodfacts.org/settings ) as default would be welcome, in the same spirit of #1376, the main case buying for yourself ( but I wonder how OFF ecosystem would fare if used to track food intake for senior citizens who rely on someone else to buy their groceries...maybe that's a funding source you guys should try to explore and tap 😄 )

The main hurdle is receipt proofs coming from other sources (like the API, or the Mobile), where this field will likely not be implemented anytime soon, and so proofs will be set to False. We could set them to True ? Or set the default value to None 🤔

Personally it doesn't worry me much as I'm decades away from being capable of using the API and I'm currently not able to use smoothie/the app/the Mobile to add prices on account of #5559 but even then I feel it would take more time for me to add prices on the go/in the shop than doing it afterward with the laptop

Funnily enough this just dropped, which is kinda related I think.

@raphodn raphodn linked a pull request Mar 8, 2025 that will close this issue
@raphodn raphodn moved this from Backlog to In progress in 💸 Open Prices Mar 8, 2025
@raphodn raphodn added the 🎯 P0 label Mar 8, 2025
@raphodn raphodn closed this as completed Mar 9, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in 💸 Open Prices Mar 9, 2025
@raphodn raphodn changed the title Proofs: allow users to specify that a receipt is not theirs Proofs: allow users to specify that a receipt is not theirs (consumption-related) Mar 9, 2025
@raphodn raphodn linked a pull request Mar 9, 2025 that will close this issue
@raphodn
Copy link
Member Author

raphodn commented Mar 9, 2025

We added a Proof.owner_consumption field in #750. Only works on proofs of type RECEIPT (& GDPR_REQUEST).

In the long run we'll maybe add a Price.owner_consumption field as well (same proof type restrictions), to allow filtering prices that we don't want to appear in our "consumption stats" (bought for someone else, ...)

@raphodn
Copy link
Member Author

raphodn commented Mar 9, 2025

Indeed we assume (rather we "simplify ^^) that bought = consumed. Maybe "consumption" isn't the right word here...
I'm not sure we'll ever go as far as to separate them though 🤔
Diet-tracking apps kinda do this already, no ? (spoiler: never used any haha)

@serpico
Copy link

serpico commented Mar 9, 2025

I'm not sure we'll ever go as far as to separate them though 🤔 Diet-tracking apps kinda do this already, no ? (spoiler: never >used any haha)

@teolemon I assume they do, it's just that I'd be interested to have an idea of the difference between painstakingly scanning/inputting every amount of food intake ( x grams of butter, etc...) every day and a "longitudinal" approach ( larger amount consumed during a longer period of time ), may be it doesn't make sense from a nutrition POV though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
3 participants