-
Notifications
You must be signed in to change notification settings - Fork 0
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
Option to repeat order cycle X times #227
Comments
This feature has also been requested by UK users thanks for creating @lauriewayne , I agree idea 1 seems like the simplest implementation. Once we have developed this the next logical additional feature would be allowing producers to check a box to add products to all repeats of an order cycle (e.g. producer always provides items X, Y & Z to hub's weekly recurring cycle). |
nice one @lauriewayne ! Dropping some notes before I forget them: deleting OC in bulk will be need as well (imagine a user repeating 100 OC by mistake 😁 ). And better performance. See this s3 bug: openfoodfoundation/openfoodnetwork#4544 |
I'm wondering if 'repeat x times' might create more problems than it solves and in fact we want to explore a more fully functioning 'repeat' system like in google calendar. Perhaps 'repeat weekly' might be a better first action that we then build off of. One for some heads to thing about :) |
Not a papercut :( |
Thanks, we have this request a lot! Probably the most requested feature. Our users ask that the same cycle (with its products) repeat every week so they don't have to manually duplicate and edit dates. The ones I talked to didn't ask to have several OC in the future, they just want the same to automatically repeat. So maybe there could be this solution which is easier:
So for one specific OC with repeat option, there would always be an ongoing one, and the history of previous ones. |
One of our UK users wants to run a regular distribution route that allows customers to order only from the producers that precede them along the route. Their key requirements are repeating order cycles (as currently the only solution for 'producers before them on the route' is an order cycle per drop off location - unless anyone has a better idea!) and allowing enterprises to save products to a repeating order cycle (as more order cycles=more admin=more mistakes). They have asked:
|
Hey folks,
The most long-term solution to this problem would refactor our order cycle model to separate the Sales Session information (Dates, shipping methods, payment methods etc) from the Offer information (a set of products for sale). Implementing this full solution would move us closer to a place in which stock and price could be controlled per order cycles, and producers could set up products on order cycles into the future AND OC could auto recur AND we could streamline subscriptions. This also brings us into closer alignment with the DFC standard. This solution is bigger than something we can tackle while we are tackling Network Revamp. A more compact solution simply automates the task of duplicating hte order cycle. The technical implementation would be something like:
@BethanOFN @audez Would this solution meet the needs of your users sufficiently that they would be willing to contribute to the funded feature? @openfoodfoundation/train-drivers-product-owners Do you see any issues with this solution? @openfoodfoundation/developers Do you see any issues with this solution? Would anyone be willing to offer a t-shirt size estimate? |
Nice @lin-d-hop !! This is exciting. It looks good to me. If we work on estimates, I would be curious to learn what would be the estimate to start first with a manual repeat/duplicate option with no automated update/creation? And from there we could allow automation options additionally. It could be a way to ship something quickly before getting into automation. I picture the manual version the same way a calendar is suggesting an event to be repeated. The OC is copied with the new dates, but no other changes occur: all settings remain the same. It's the user who must edit manually. When they edit we could offer the option to apply the changes on all future OC that were duplicate from the same one or just edit the current one (but maybe this is even not something to propose in the v1 as it would require to keep a link between OC that were created out of the same original one). So in this first release, no schedule task, no automated edits. We don't need the webhook to be released before to work on this. One last thing: apart from the dates, we need a unique name as well. Do we keep the "Copy of" prefix? |
Nice idea to estimate that and break up the development into smaller pieces. Would be good to know the difference in size. I imagine the funded feature would implement through to automation since that is the core need. Just to note, the webhook doesn't need to be finished to do this. I suggested it as an implementation suggestion as it moves us closer to some of Davids ideas here. |
Me too! If it's an easy step, I see it as a way to handle all extra / edgy / wedidnotseeitcoming use case that can come up when people start using.
Alright! I also widely prefer webhooks to any scheduled task. On the long run scheduled task can always be a pain. I don't remember how many times in my life I've heard "oh yeah we've deployed and forgot to restart the cron task" :D |
I am wondering what happens to product selections on the 'incoming' screen when the OC is duplicated. |
Also about: "The most long-term solution to this problem would refactor our order cycle model to separate the Sales Session information (Dates, shipping methods, payment methods etc) from the Offer information (a set of products for sale)." |
I like Lynne's idea to duplicate an order cycle when it closes and adjust the dates. Duplicating the last one and not creating any in advance has the advantage that we don't have to update any future order cycles when making changes. We have the OC clone already and would need to add a new field for the cycle period, e.g. 1 month. What's a good name or it?
If we just add that field to the OC and modify the clone action to do this adjustment when its set then this could be done in a day. Triggering the rule automatically when the order cycle closes would take another day or two. Do we need to have a separate checkbox for that? I mean, is it useful to have manual renewals as well as automatic renewals? Thinking of the bigger picture, I was wondering if we want a new |
Aoutmations: you just blew my mind! But yes, I agree with your conclusion. With more webhooks and API abilities, we could set up more automations specific to individual needs. Most likely building up our ecosystem in n8n I guess. I like Lynne's idea too. |
I feel like yes. For 2 reasons: manual renewals can handle cases we haven't foreseen when setting up rules for automatic renewals. also automation can always fail, it's good to have a workaround on such feature. But I guess we probably need to set up a limit in the X number of time we want to duplicate? I just realized that if the user create and then wants to delete, we don't have any bulk delete in place. |
I specifically designed this enhancement such that it does not create any future OCs in advance - the OCs are only created one at a time. This eliminates the need for bulk deletes or 'repeat x times' as it is one at a time - turn off when no more repeats needed. It also means that every edit to an OC will flow through to the next OC which is very important. |
@lin-d-hop I was speaking about the manual option |
Ah sorry. Do we not already have a manual option? The duplicate button. The logic I used was to keep the automation as minimal as possible by basing it on the manual process.... which is to click this button ;) |
This is what people do now. Hence the proposed solution is an improvement. We just add the small enhancement to what people are already doing which saves time :) |
I don't see it as a solution to this need. I was speaking about a manual repeat option like you may have in a calendar. Work which is estimated at 1 day if I understand Maikel's post. |
Okay I guess I'm not understanding something. The basic need here is to reduce the mundane step of going in every week/fortnight/day to click the duplicate button. You would manually say what the duplication cycle is (see image in the proposal). To manually duplicate outside of the duplication cycle you just do what you are doing now. I'm really confused now. |
@lin-d-hop let's perhaps have a chat about it? When I've proposed to first estimate the manual option you seemed onboard, but it looks like we might have misunderstood each other. The "manual" option as I see it is the same solution as you are proposing apart that it has no automated tasks: OC are created in advance, it just removes the need to click multiple times on the duplicate button. It creates all OC in advance. No automated update. |
I think we need to avoid having the OCs created in advance. This creates problems as producers and hub manages edit an OC and then need this information to flow through to future OCs. Personally I think that while OFN logic puts sales session and offer info into the same model we need to be careful to avoid creating OCs in advance. |
Yes I see now that I misinterpreted your original message. I am actively advocating against creating any OC in advance. Lol, in case that's not clear 🤣 |
Tshirt size - very large. I would say 10-30 dev days -> 10000-30000 euros. But we can't work on this until after network feature so we wouldn't be able to deliver this year. How confident are you on the funding? |
We are writing a proposal with flower hubs now so no money in hand yet. Our plan is to ask for development funding - $20,000 in year one (current year) and an additional $20,000 in year two. We are limited by what we can propose because we need matching funding, and this is the best we can do. BUT - we are going to ask the grant officer if its possible to consider foreign partners - and if so, can we consider global pot money as 'matching'. That opens up possibilities if we can do that. Regardless - there are a range of issues that flower hubs want- and most of them are the same as other issues in our pipe anyway - so we won't propose things too specific. And we can see what the immediate need is when/if the funding materializes. But estimate is good - helps me ballpark. Thanks. |
Ok, your call 👍 . I guess my main concern is that as the OC is created only when the previous one closes, if the creation fails the user only know it last minute. But let's try it, maybe I'm just too pessimist on automation :D |
I propose the following steps then: Step 1: Add the optional field Each of these can be a papercut. |
@mkllnk Above you said 2-3 days total. Now you say 1 day total. Not sure about that 🤔 @RachL Perhaps we need to include an email to the hub manager(s) when the OC opens "Your next ordercycle has opened". That way the user will know when they receive the email that it worked. That might help with automation nervousness (which I share) |
I'm going to take this back to the interested UK user thanks all, @audez & @lauriewayne do you also have users who could potentially fund? |
Wow this is cool, very cool. I can't help wondering if there's some little gem out there that manages repeat cycles with all the options like in a google calendar, surely someone has done that. Like https://stackoverflow.com/questions/5301283/ruby-gem-to-handle-recurring-calendar-events? Very elegant way to get around all the problems, nice one |
Hi! Does it have to be funded if it's a papercut? If yes, do we have an idea of the total amount (so we can tell the users if we're talking about a participation of 10€ or 100€)? Thanks in advance :) |
Uncertainty adds time in the estimate. Now that I have a specific solution on my mind, the implementation seems straight forward. But I didn't account for unknown complications in the papercut estimate. And it depends a little bit on the state of the webhooks work. It's quicker if the order-cycle closed webhook work is done when we start this work. Part we can also do some of that event triggering work here, which could add a day. The first part, adding a repetition_period and using that during clone is simple and is not depending on anything else. We can do a quick version in a papercut or we can put a bit more effort into it, discussing wording more, spending time on the UX and then this part can become one or two days. It's all flexible. |
Nice find. The mentiond ice-cube gem does too much for our simple case but could become handy if we created more event rules like it. But it lead me to the iCalendar spec which has a nice format and terminology. We need only the rule part of it but that's a good guide. So for a fortnightly order cycle, we can store:
We can extend that over time, most work in adding the UI and then use the ice-cube gem to calculate the next dates. Supported examples are:
|
What is the need / problem?
Enterprise managers can copy order cycles, but only one at a time. If an enterprise wants a weekly (for example) order cycle for 16 weeks, they have to copy it 16 times. If they could create one order cycle and check on "repeat [xx} times" they could set up a whole season more quickly.
Which type of users does this problem affect (and how many, if known)?
All/any:
X- Hub Managers (MCFEs)_ (any who have regular, repeating order cycles)
X- Producers_(any who have regular, repeating order cycles)
Potential solutions that will solve the problem ?[[brainstorming to list feature candidates]
Rando ideas:
Connected wishlist and discovery discussions* [list precedent discussions]
https://community.openfoodnetwork.org/t/create-order-cycles-in-bulk/1634
https://community.openfoodnetwork.org/t/enterprise-can-create-a-series-of-recurring-order-cycles/120
Additional context
This is an option in Local line that has been requested by new users. It really doesn't seem that different from clicking the clone button a bunch of times but it might feel different.
Is Papercut or feature candidate?
Add papercut or feature label to answer the question. If you are not sure, don't worry product team will cover :-)
The text was updated successfully, but these errors were encountered: