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

Andy/col 524/copy project #1708

Open
wants to merge 9 commits into
base: development
Choose a base branch
from

Conversation

jollyblondgiant
Copy link
Contributor

Purpose

adds button on project review page that copies existing project, including questions, answers, and plot data.

Related Issues

Closes COL-524

Submission Checklist

  • [ x] Included Jira issue in the PR title (e.g. COL-### Did something here)
  • [ x] Code passes linter rules for each file you updated. To lint all files at once, run npm run lint. To just lint one specific file run npx quick-lint-js src/js/<file-you-changed> --snarky.
  • [ x] No new reflection warnings (clojure -M:check-reflection)

Testing

Module Impacted

Projects

Role

Admin

Steps

1.navigate to an project review page (ie by cicking the "edit" icon). note the project id
2. observe the "copy entire project" button. briefly admire, then click.
3. click through modal windows confirming choice.
4. find yourself, amazed, at the survey questions page of a nearly identical project. note the new projectId.

Desired Outcome

A new project has been created in the backend that matches the existing project

Screenshots

Copy link
Contributor

@a-luz a-luz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice idea for the modal, I like it a lot. And we'll probably use it in other places as well.
For this feature, we need to also copy the survey answers (table sample_values), maybe substitute the 'copy project plots' for 'copy project answers' in the promptModal?

src/js/components/PageComponents.jsx Outdated Show resolved Hide resolved
@jollyblondgiant
Copy link
Contributor Author

@a-luz

Very nice idea for the modal, I like it a lot. And we'll probably use it in other places as well. For this feature, we need to also copy the survey answers (table sample_values), maybe substitute the 'copy project plots' for 'copy project answers' in the promptModal?

Thank you very much. I hope we get a lot of mileage out of it. I have added survey_questions to project duplication. I included the two questions in the modal as they are parameters required for project creation but do not actually end up as part of the project, so in this case I had to capture that new data on duplication. That is to say it does not strike me as necessary at this time to prompt for the questions; nevertheless the modal component is indeed able to extend to accommodate that prompt easily.

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

Successfully merging this pull request may close these issues.

2 participants