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

Import-archives are missing username (Sync 1) #2713

Open
lachko opened this issue May 6, 2021 · 1 comment
Open

Import-archives are missing username (Sync 1) #2713

lachko opened this issue May 6, 2021 · 1 comment

Comments

@lachko
Copy link
Contributor

lachko commented May 6, 2021

After importing data from a json archive the username disappears for the user that exported the data. After looking deeper into this. I see a difference in the user-profile json between records
On the left a record that contains the username and on the right how the record looks after data was imported for this user from a JSON export
Screen Shot 2021-05-06 at 11 54 16 AM

@lachko
Copy link
Contributor Author

lachko commented Mar 18, 2022

To make the import work I've modified the map function in the import-archives.bin.js file. Note the bold below:
.map(row => {
if (row.doc.collection !== 'TangyFormResponse') return
if (row.doc.form && row.doc.form.id !== 'user-profile') {
row.doc.items[0].inputs.push({
name: 'userProfileId',
value: userProfileDoc._id
}, {name: 'tabletUserName', value: archive[0].databaseName})
}

@lachko lachko assigned chrisekelley and unassigned chrisekelley May 31, 2022
@esurface esurface self-assigned this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants