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

Edit habit without deleting it/recreating to avoid losing history #38

Open
lee-hodg opened this issue Jul 22, 2020 · 4 comments
Open

Edit habit without deleting it/recreating to avoid losing history #38

lee-hodg opened this issue Jul 22, 2020 · 4 comments

Comments

@lee-hodg
Copy link

Can I edit without having to delete? e.g. rename or change the daily goal?

@oppiliappan
Copy link
Owner

This feature is in progress, over at the feature/edit branch.

@atanunq
Copy link

atanunq commented Feb 21, 2021

Just stumbled upon this issue while looking for a rename functionality. Is the content in the branch still relevant?
I am interested in implementing this, but haven't yet dived into the source. Do you think you can give me some high level pointers on how you think this should work? Just two new set-{name,goal} commands?

@oppiliappan
Copy link
Owner

Hi @atanunq,

The changes in that branch don't quite fit in with the new architecture I have in mind. Setting the name is fairly trivial (that is about as far as I got in that branch), but setting a goal is a little tricky:

  • a Bit habit has a goal of 1, and a Count habit has a goal of any integer that is not 1
  • changing a goal from 1 to, say 2, should change the habit type from Bit to Count (and if we get other habits down the line, maybe affect those as well)

I think the obvious solution is to error out when attempting to set goals that change the habit type, for which I am drafting a couple of changes right now (these changes accommodate new habit types as well). I think this will greatly help error messages returned by the command line, and improve the add and add-auto command as well.

However, I am very happy to see that you are interested in contributing to dijo!

@atanunq
Copy link

atanunq commented Feb 21, 2021

I see. Thank you for the fast reply!

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

No branches or pull requests

3 participants