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

When a session is created without a new task/project, report existing incomplete tasks/active projects that match the provided task/project title. #40

Open
pawelgrimm opened this issue Oct 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@pawelgrimm
Copy link
Owner

HTTP response should trigger UI popup to either select the existing task/project or to create a duplicate with the same name. Could be implemented with a new "confirmExisting=true" body parameter

Imagined flow:

if (project.title) {
  const foundProject = await Projects.selectBy({title: project.title});
  if (foundProject) {
    project = foundProject;
  } else {
    return {}; // Create new project and task
  }
}
// now we have a project Id AND we know we don't "need" a new project
if (task.title) {
  const foundTask = await Tasks.selectBy({title: task.title, project_id: project.id});
  if (foundTask) {
    task = foundTask;
    return { project, task }; // Ask user if existing project should be used, then ask if existing task should be used
  } else {
    return { project }; // Create new task // Ask user if existing project should be used, create a new task
}
@pawelgrimm pawelgrimm added the enhancement New feature or request label Oct 30, 2020
@pawelgrimm pawelgrimm mentioned this issue Oct 30, 2020
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant