rdmo icon indicating copy to clipboard operation
rdmo copied to clipboard

js: fix copy attribute #995

Open MyPyDavid opened this issue 1 year ago • 4 comments

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.

MyPyDavid avatar May 17 '24 14:05 MyPyDavid

Oh crap, we had a similar thing with the options before. Thanks for fixing!

jochenklar avatar May 17 '24 16:05 jochenklar

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
          })
        })

jochenklar avatar May 17 '24 16:05 jochenklar

Optionsets need to remove questions.

jochenklar avatar May 17 '24 16:05 jochenklar

do Options also need to remove conditions?

MyPyDavid avatar May 21 '24 14:05 MyPyDavid

Option does not have a condition field, so I would say no.

jochenklar avatar May 27 '24 09:05 jochenklar

It does not harm either.

jochenklar avatar May 27 '24 10:05 jochenklar