rdmo
rdmo copied to clipboard
js: fix copy attribute #995
Description
Related issue: #995
Motivation and Context
How has this been tested?
Screenshots (if appropriate)
Types of Changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
Checklist
- [ ] I have read the contributor guide.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
Oh crap, we had a similar thing with the options before. Thanks for fixing!
Conditions need the same treatment:
]).then(([element, attributes, optionsets, options,
pages, questionsets, questions, tasks]) => {
if (elementAction == 'copy') {
delete element.optionsets
delete element.pages
delete element.questionsets
delete element.questions
delete element.tasks
}
return ({
element, attributes, optionsets, options, pages, questionsets, questions, tasks
})
})
Optionsets need to remove questions.
do Options also need to remove conditions?
Option does not have a condition field, so I would say no.
It does not harm either.