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

Retain ordering groups and controls #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sawpresto
Copy link

When running the migration for processes with both inherited and custom groups and fields, the order isn't retained so that custom fields are always last. This PR will keep the order of the fields and groups so that they are the same when migrating processes.

@msftclas
Copy link

msftclas commented Sep 9, 2019

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@liang2zhu1 liang2zhu1 left a comment

Choose a reason for hiding this comment

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

Thanks you raising this PR - looks good to me !

src/Common/Utilities.ts Show resolved Hide resolved
newGroup = await this._createGroup(createGroup, page, section, witLayout, payload);
group.id = newGroup.id;
}

for (const control of group.controls) {
for (let controlIndex = 0; controlIndex < group.controls.length; controlIndex++) {
let control = group.controls[controlIndex];
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - use const than let ?

Copy link
Author

Choose a reason for hiding this comment

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

Are you referring to changing to const control = groups.controls[controlIndex];? It looks like the compiler won't allow changing const controlIndex = 0; controlIndex < group.controls.length; controlIndex++ because it can't be incremented as constant.

@sawpresto
Copy link
Author

@liang2zhu1 Will this get merged or is the project inactive now?

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.

3 participants