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

Clean up remaining Google Drive projects #5830

Merged
merged 36 commits into from
Dec 7, 2023

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Nov 9, 2023

Closes #5403

Why is this the best possible solution? Were any other approaches considered?

The only thing of note here is that I've removed the protocol from server settings at all:
image
It's just one protocol now and we are not going add anything there soon I guess so it doesn't make sense to display it.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

This removed GD integration completely. In one of the previous versions, we have added removing GD project that didn't have any unsent forms. Here we go one step further and if there are still projects like that we convert them to ODK protocol and get rid of the whole code responsible for working with GD.
That means we need to test that:

  • after upgrading from a version with a GD project without any filled forms the project does not exist anymore
  • after upgrading from a version with a GD project with filled forms the project exists but it's not a GD project anymore. There also should be a banner displayed in the main menu saying that's it's an old GD project.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • added a comment above any new strings describing it for translators
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 force-pushed the COLLECT-5403 branch 4 times, most recently from c643abb to 3cdd5af Compare November 10, 2023 09:53
@grzesiek2010
Copy link
Member Author

This pull request removes Google Drive functionality converting GD projects that couldn't be removed to ODK protocol so we need to update the banner:
image
This should say something like: This project used Google Drive. The functionality was removed in the latest app update.
@alyblenkin can you help?

@grzesiek2010 grzesiek2010 marked this pull request as ready for review November 10, 2023 11:12
.circleci/config.yml Outdated Show resolved Hide resolved
if (result == DeleteProjectResult.UnsentInstances || result == DeleteProjectResult.RunningBackgroundJobs) {
unprotectedSettings.save(ProjectKeys.KEY_PROTOCOL, ProjectKeys.PROTOCOL_SERVER)
unprotectedSettings.save(ProjectKeys.KEY_SERVER_URL, "https://example.com")
settingsProvider.getMetaSettings().save(MetaKeys.getKeyIsOldGDProject(it.uuid), true)
Copy link
Member

Choose a reason for hiding this comment

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

Why save this to meta settings and not just to normal ("unprotected") settings?

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking was that unprotected settings represent the section of unprotected preferences in the app, the same with the protected ones and if we want to save something that does not have a visual representation then it should be in meta settings.

Copy link
Member

Choose a reason for hiding this comment

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

I'd more thought that anything that's a "project" level goes in "unprotected". I guess this is really information "about" the project itself rather than a setting so I do see why it's in meta, but it feels a little awkward that you have to still index by project. Would it be a possibility that this could live on Project itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would it be a possibility that this could live on Project itself?

Yeah, I think it's a good idea.

@alyblenkin
Copy link
Collaborator

This pull request removes Google Drive functionality converting GD projects that couldn't be removed to ODK protocol so we need to update the banner: image This should say something like: This project used Google Drive. The functionality was removed in the latest app update. @alyblenkin can you help?

Sorry for missing this comment! What about:

"Your project uses Google Drive. This functionality will be removed X date."

I think it would be great to say the exact date, rather than people having to figure out when it's going to happen.

@lognaturel
Copy link
Member

lognaturel commented Nov 16, 2023

@alyblenkin this is one last informational message for people who still had submissions in their GDrive projects.

"This project was previously connected to a Google Drive account. Google Drive support has been removed. You can configure a server or pull submissions to a computer."

The last sentence could just be in the "learn more" but it seems somewhat helpful to give an idea of what needs to be done now.

@grzesiek2010 grzesiek2010 requested a review from seadowg November 16, 2023 23:05
Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

@grzesiek2010 grzesiek2010 requested a review from seadowg November 21, 2023 00:22
@grzesiek2010 grzesiek2010 merged commit 836d5da into getodk:master Dec 7, 2023
6 checks passed
@dbemke
Copy link

dbemke commented Jan 9, 2024

I installed 2022.4.4 and created a GD project with a draft and a finalized form. I upgraded Collect there is no banner in the main menu.

@dbemke
Copy link

dbemke commented Jan 10, 2024

@grzesiek2010 Would you like me to file the issue above in a separate issue?

@grzesiek2010
Copy link
Member Author

@dbemke I think this would be the best approach - file new issues if you test pull requests that are already merged.

@dbemke
Copy link

dbemke commented Jan 12, 2024

Tested with Success!

Verified on a device with Android 10

Verified cases:

  • filed issue No banner about GD project after upgrading to the current version #5903
  • upgrading a GD project with saved forms and without saved forms
  • upgrading when there is a GD project and the demo project
  • adding project after upgrading
  • trying to reconfigure an upgraded GD project with a QR code with an old GD project
  • reconfiguring an upgraded GD project with a QR code with Central project
  • upgrading 2022.4.4 to 2023.2.0 and then to the PR version
  • resetting the upgraded GD project

@srujner
Copy link

srujner commented Jan 12, 2024

Tested with Success!

Verified on a device with Android 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up remaining Google Drive projects
6 participants