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

Add barcode scanner to main screen #652

Merged
merged 5 commits into from
Jul 12, 2023
Merged

Conversation

chaneylc
Copy link
Member

@chaneylc chaneylc commented Jun 30, 2023

Description

Adds button to config page that searches for unique obs unit id and switches to that field if needed. If one is found it automatically switches to the collect activity at that id. Fixes #632

Type of change

What type of changes does your code introduce? Put an x in boxes that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated relevant documentation

Changelog entry

Please add a one-line changelog entry below. This will be copied to the changelog file during the release process.

Added observation unit barcode scanner to main screen

@github-actions
Copy link

github-actions bot commented Jun 30, 2023

🤖 Pull request artifacts

file commit
pr652-1-config_barcode_button-Field-Book.apk 7143d28

github-actions bot added a commit that referenced this pull request Jun 30, 2023
@trife
Copy link
Member

trife commented Jul 5, 2023

@chaneylc can you resolve the CollectActivity conflict?

…ode_button

# Conflicts:
#	app/src/main/java/com/fieldbook/tracker/activities/CollectActivity.java
github-actions bot added a commit that referenced this pull request Jul 10, 2023
@trife
Copy link
Member

trife commented Jul 11, 2023

@chaneylc Would it make more sense to reuse the existing switchfield functions from the StudyDao and FieldEditorActivity? I think Collect should only open if there is a successful barcode match, so probably move that logic into Config.

@chaneylc
Copy link
Member Author

They do use the same function, DataHelper's switchField. Since its handling obs units I think it makes mores sense to be in Collect, since its using the already existing GeoNav feature for switching fields. But I see your point too and I can try to wrap some of that code in a utility and make that happen in Config.

github-actions bot added a commit that referenced this pull request Jul 12, 2023
@trife trife merged commit cf551f1 into main Jul 12, 2023
1 check passed
@trife trife deleted the issue/632/config_barcode_button branch July 12, 2023 21:16
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.

Add barcode scanner to main screen
2 participants