Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Search AG_Handout_kits for kit_id and barcode #651

Merged
merged 4 commits into from Mar 26, 2014

Conversation

teravest
Copy link
Contributor

Now that we are doing handout kits if a participant losses credentials sql is currently the only way to retrieve them. This change addes ag_handout_kits to the search page.
If a kit_id or barcode is not found in the normal tables than ag_handout_kits is searched.

barcodes to test with
000000001 - normal results
000015537 - ag_handout_kit results with one barcode in the kit
000015522 - ag_handout_kit with 5 barcodes in the kit
010000000 - no results found

fixes #641

@@ -260,6 +268,28 @@ if 'search_term' in form:
# Close the div for this login
req.write('</div>')

elif len(kit_list) > 0:
Copy link
Member

Choose a reason for hiding this comment

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

This block only executes if len(login_list) is greater than 0; is that the intent? It seems to me that you would want to display this information regardless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually it only executes if len(login_list) is <= 0. The information is
already displayed if the barcode has a log in associated with it. Its the
case where it doesn't that we need to get the info from ag_handout_kits.

Emily

On Wed, Mar 26, 2014 at 11:19 AM, adamrp notifications@github.com wrote:

In www/wwwadmin/ag_search.psp:

@@ -260,6 +268,28 @@ if 'search_term' in form:
# Close the div for this login
req.write('')

  • elif len(kit_list) > 0:

This block only executes if len(login_list) is greater than 0; is that
the intent? It seems to me that you would want to display this information
regardless.

Reply to this email directly or view it on GitHubhttps://github.com//pull/651/files#r10987337
.

@adamrp
Copy link
Member

adamrp commented Mar 26, 2014

Woops, that's what I meant -- wrong inequality! I see now, though. Could you change the name of the variable from kit_list to handout_kit_list to eliminate the ambiguity?

req.write('<th>barcode</th>')
req.write('<th>verification_code</th>')
for row in results:
tableout= '</td><td>'.join(row)
Copy link
Member

Choose a reason for hiding this comment

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

There seem to be a few extra tabs in this blocks and adding a comment explaining the the row creation would be awesome.

@ElDeveloper
Copy link
Member

t0klc0c

ElDeveloper added a commit that referenced this pull request Mar 26, 2014
Search AG_Handout_kits for kit_id and barcode
@ElDeveloper ElDeveloper merged commit efc3ed6 into qiime:master Mar 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add search for ag_handout_kits table
3 participants