-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Feature: allow replacing project with template #1889
Conversation
Something isn't right here. After replacing a project from a template, I get an error when trying to preview in Enketo. Also, sometimes if I go to the form builder immediately after replacing with a template, I see the old form questions in the builder. I would need to refresh to see the new questions. |
# Conflicts: # jsapp/js/components/formEditors.es6
and rename onComplete to onCompleted for consistency
plus rename onComplete to onCompleted and move update asset error notification to actions
@pmusaraj ready to be tested :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this branch both locally and on a demo (du), and got a 500 error when trying to replace a project with a template.
jsapp/js/actions.es6
Outdated
@@ -383,17 +383,21 @@ actions.resources.listTags.completed.listen(function(results){ | |||
} | |||
}); | |||
|
|||
actions.resources.updateAsset.listen(function(uid, values, params={}) { | |||
actions.resources.updateAsset.listen(function(uid, values, callbacks={}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't change params
to callbacks
here, and we shouldn't change onComplete
to onCompleted
below. It's not necessary to make these changes to nomenclature, it is longer to review and it's also prone to merge conflicts (the searchStore
branch makes changes in the same lines, roughly).
@pmusaraj I undid all these unnecessary naming changes and custom callbacks (and will try embrace natural Reflux actions from now on :-P) |
Naming changes look good. |
Currently blocked by BE issue: |
# Conflicts: # jsapp/js/actions.es6
@pmusaraj BE issue fixed, ready to be reviewed and merged :) |
# Conflicts: # jsapp/js/components/formEditors.es6
@pmusaraj ping :) |
Tested this on |
@pmusaraj fond the problem - Form Builder uses allAssets store, which unlike searches wasn't being updated on updateAsset action. This can also fix some other unknown bugs. Deployed on |
@pmusaraj ping ;-) |
I tested this and it seems to work well. Penar may not have time to do any more reviews. I'd be happy to merge once the order is changed as I indicated above. |
Description
Replacing project with template implementation. FE uses PATCH on asset with
clone_from
parameter (there is a bug, see related issues).Related issues
fixes #1887
fixes #1810
blocked by #1892