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

ability to rename project #8

Open
masukomi opened this issue Dec 18, 2022 · 9 comments
Open

ability to rename project #8

masukomi opened this issue Dec 18, 2022 · 9 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@masukomi
Copy link
Owner

masukomi commented Dec 18, 2022

proposed interface

hey rename project <old name> <new name>

Behind the scenes this would just need to do a

UPDATE projects SET name = 'new-name' 
WHERE name = 'old-name`;

Project names should be unique, and can't be "archived", so this change should be safe without other constraints.

@masukomi masukomi added enhancement New feature or request good first issue Good for newcomers labels Dec 18, 2022
@maddy020
Copy link

Please assign this issue to me

@masukomi
Copy link
Owner Author

masukomi commented Dec 19, 2022

All yours maddy. Thanks for pitching in! :D

Please note that main is slightly ahead of the official release. I just haven't released the new stuff because of this fez bug. Until i get that resolved new changes won't be pushed to fez. :/

@masukomi
Copy link
Owner Author

masukomi commented Dec 19, 2022

Just to be explicit. I don't think there needs to be a check if the "new name" already exists, but 🤔 I wonder if there should be a check with the user. Something like "Hey, [new name] already exists. Do you want to merge [old name]'s records into it?"

@masukomi
Copy link
Owner Author

Damn. just realized that if the target name exists then you have to repoint all the entity_project to the new project id, and then delete the old project.

I was planning on "merge projects" as a separate ticket, but i think they're ultimately the same thing @maddy020.

Sorry that the complexity of this one is growing. If you just want to do a tiny PR that only renames IF the target name isn't already used I'd be fine with that. I can handle the merge stuff separately.

@masukomi
Copy link
Owner Author

You still planning on poking this @maddy020 ?

@maddy020
Copy link

Ohh @masukomi
Forgot about this issue
I got busy in other tasks
Can you please tell me in which file this change is required

@codesections
Copy link
Contributor

codesections commented Mar 10, 2023

Project names should be unique, and can't be "archived",

Should the fix for this issue also add a hey remove project <name> command as well? This would help declutter the output of hey projects when a user no longer cares about a project. It would also make tab-completion more helpful (once #23 is implemented).

edit: Or maybe the command would be hey kill project <name> for consistency with hey kill <name> and hey kill timer <id> ?

@masukomi
Copy link
Owner Author

Sorry been heads down in job-hunt land and accidentally removed "check github notifications" from the main part of my daily checklist... and thus kept forgetting to check 🤦‍♀️

i like hey kill <thing> <identifier> but it introduces other concerns and additional complications. I've documented my thoughts in a project specific version in Issue #34

(now to tackle the open PRs... ;) )

cc @codesections

@masukomi
Copy link
Owner Author

masukomi commented Mar 23, 2023

@maddy020 if you're still interested it'd prolly just be a change to the bin/hey for the command and lib/Hey/Project.rakumod for the actual behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants