vsoch / freegenes

FreeGenes BioNode with Django
https://vsoch.github.io/freegenes/
Mozilla Public License 2.0
2 stars 4 forks source link

Remove extra items from Outgoing Orders section #67

Closed hverdonk closed 5 years ago

hverdonk commented 5 years ago

The Outgoing Orders section has several OpenEnzyme requests whose status is listed as "Cart". As these have not yet been ordered, I'd prefer not to see them, as it's confusing.

There's also one order called OpenEnzyme_1 that has the "pOpen_v3 individual" distribution. I'm not sure what that order is, but it's listed as "Processing" even though it's never been ordered to my knowledge. Is it a test order as well?

vsoch commented 5 years ago

I don't see any on the outgoing orders dashboard page with status "cart" - all are "Processing" or "Completed" - can you link/take a screen shot? I'm looking at the table here https://freegenes.dev/dashboard

I think that order is my testing order, safe to ignore :)

hverdonk commented 5 years ago

In the graph listing, they all appear as either "Processing" or "Complete," but when I click on one of the OpenEnzyme_1 orders listed as "processing" to get a better look at it, its status says "Cart." I assume these are also test orders, but the "Cart" status has me doubting.

Screen Shot 2019-10-04 at 12 29 45 PM Screen Shot 2019-10-04 at 12 30 17 PM
vsoch commented 5 years ago

Thanks for the clarification! Yes let me see if I can remove those from the list - technically every "Cart" (not submit order) is an order so that's why you are seeing it there - but it is in fact not something you'd want to see. :)

hverdonk commented 5 years ago

I assumed it was something like that. Thanks!

vsoch commented 5 years ago

ok so what we are hitting is an issue with having older orders that were import into the system - the default for ordered is False, and I can't tell which ones are complete (vs. still processing) are you able to (for the orders that were in the system at the onset) tell me which ones are complete / ordered? That's the current issue with the filtering - booleans that should be True are set to False.

hverdonk commented 5 years ago

All the ones with a lab name attached should be complete (and are listed as complete in the main orders page, but not on their individual pages). I've listed them here for convenience:

OpenEnzyme - BioBlaze OpenEnzyme - Biotech Without Borders OpenEnzyme - ChiTownBio OpenEnzyme - Manifest Biology OpenEnzyme - SoundBio OpenEnzyme - TheLab

Also, there was one in-progress test order of pOpen_v3 from Isaac which was made through the ordering system, but has now disappeared.

Edit: There are several unlisted complete orders which I need to add - would it be easier to add them now, or after we've finished debugging this issue?

vsoch commented 5 years ago

Okay - I've updated all those orders booleans to be ordered = True.

The one from Isaac must be this one, which does appear (last in the list) https://freegenes.dev/o/details/cd3f748d-058f-43f6-8e23-3fa1c3537f7c - it's the only one associated with his user account.

If you add an unlisted order, you can do so in the admin interface, just make sure to set received to True, and ordered to True.

hverdonk commented 5 years ago

Awesome, thanks for fixing that!

The order you've listed isn't Isaac's - his was incomplete, as I couldn't select a FedEx rate for it.

I've triggered a couple errors trying to add unlisted orders in the Admin interface. When I create the order without attaching a user to it, I get the colorful error splash screen. When I list myself as the user, I get the error message "User hverdonk has a pending order, only one cart is allowed," as well as the notification that the "Transaction" and "Label" fields are required. Currently, I have nothing in my cart, though I added and removed an item some time ago, and the software may think it's still present.

I can use different credentials to create a separate account and temporarily get around the cart issue, but what is meant to go in the "Transaction" and "Label" fields?

vsoch commented 5 years ago

What is Isaacs username? I had thought it was something like "Eyesgack", and there is only one associated order with that username - the one I linked. Did you create it differently than the standard flow? Does he have a different username?

I sent you an email about the cart issue - you can try not specifying a user (leaving as None/undefined) to see if that works.

vsoch commented 5 years ago

What you can do is look in the admin interface and find the order you are looking for. No orders have been deleted (by me) so it should still be there. Once you found it, let me know the uuid and we can look at it and see why it's not showing up.

hverdonk commented 5 years ago

Huh. That's interesting. His username is Eyesgack, you're correct. I had assumed the order he placed through our site was "pOpen_v3 order," which has the description "A test shipment to Isaac Larkin." That might be why FedEx doesn't feel like cooperating on this order. I'll ask him to make another order to see what happens, and update you with the results in #52. Incidentally, the "pOpen_v3 individual" order that he's listed with is the one where I messed up the dry ice weight, so it's not actually complete and can be deleted.

Leaving User undefined crashes the "Create Order" page no matter which save button I click. Both "ordered" and "received" are checked.

vsoch commented 5 years ago

ah, that might be it! I just deleted the "pOpen_v3 individual" order, per your request. You are correct that it doesn't have an associated user - you can try adding him in the admin interface and maybe the FedEx rates will work properly? It's worth a test!

The crash when the user is None should now be fixed.

hverdonk commented 5 years ago

I tried to update the user on Isaac's test order, and it triggered a crash.

Also, most of the orders won't let me update them unless these two fields are filled in. What should I put in them?

Screen Shot 2019-10-07 at 9 17 40 AM
vsoch commented 5 years ago

They shouldn't be required- I'm heavily into working on the refactored twist import but will try to get to this later this week.

hverdonk commented 5 years ago

Okay, thank you!

vsoch commented 5 years ago

okay these are removed! You should be able to create orders without users, and not needing those fields.

hverdonk commented 5 years ago

Wow, that was fast! Thank you so much!

hverdonk commented 5 years ago

Wow, that was fast! Thank you so much!

I'm able to add orders now, but even when I set "Ordered" and "Received" to True, the order status in the "Shipments" list isn't updating correctly. It also still lets me create shipments for those completed orders.

vsoch commented 5 years ago

The shipments list will show orders that have a label (meaning they were processed), so in order for them to show up (and for you not to be able to create a label) we would need to artificially add a label. What I can do (if you plan to artificially create shipments like this) is to instead use the boolean "received" for that list. That won't change that you are able to make a shipment, because they don't have labels. Let me know how you'd like to proceed.

hverdonk commented 5 years ago

I don't plan on artificially creating shipments like this in the long-term, so I wouldn't bother refactoring the code. I can provide you with the labels that were already generated for those shipments, if that would help

vsoch commented 5 years ago

Yes! That would be perfect! For each order, the "label" is actually a json structure that provides metadata and links to the pdf, etc. What I can do is provide you with a template for one here:

{'eta': '2019-08-16T17:42:00Z',
 'rate': '6f87956236104eccb66ce4124b7d457e',
 'test': False,
 'order': None,
 'parcel': '66d8d5ae4f684921a3b0126a3b4939e7',
 'status': 'SUCCESS',
 'billing': {'payments': []},
 'messages': [],
 'metadata': '',
 'label_url': 'https://shippo-delivery-east.s3.amazonaws.com/aab01e0a0b194c91bca8c202d1a60887.pdf?Signature=pmaCvttEzoheqwTWW4v8xqvjcUY%3D&Expires=1597261997&AWSAccessKeyId=AKIAJGLCC5MYLLWIG42A',
 'object_id': 'aab01e0a0b194c91bca8c202d1a60887',
 'object_owner': 'drew_endy_lab@stanford.edu',
 'object_state': 'VALID',
 'object_created': '2019-08-13T19:53:16.350Z',
 'object_updated': '2019-08-16T21:03:54.800Z',
 'tracking_number': '789108941160',
 'tracking_status': 'DELIVERED',
 'tracking_url_provider': 'https://www.fedex.com/apps/fedextrack/?action=track&cntry_code=us&trackingnumber=789108941160',
 'commercial_invoice_url': None}

We don't use the dates for anything, so you could probably just copy pasta those. What the site does use is the tracking_url_provider and label_url, so if you are able to get those, that would be great! You can send them to me however works best - just make sure each structure is labeled with the Order Name / id so I can identify it.

hverdonk commented 5 years ago

Alright, here you go! FedEx doesn't like to give out old shipping labels, so for the starred entries I've just provided links to the shipment's info in place of the label for the shipments I made through FedEx itself.

I assume the object ID will have to also be changed for each of these, but you'd know better about that than I.

Once the other distributions are put into the system, I'll have a few more of these to add.

redacted

vsoch commented 5 years ago

Thanks @hverdonk ! It's 7 pm here and I'm exhausted, will do this tomorrow.

vsoch commented 5 years ago

okay these are all updated! Take a look and let me know if any are present that shouldn't be. We might still need to tweak some of the logic for the filtering, but at least adding the labels made it so some of these (manually generated) orders appear in the Shipments list.

vsoch commented 5 years ago

I've also removed the json from the conversation here, just so we don't have random personal information (email, links to pdfs with addresses etc.) lying around.

hverdonk commented 5 years ago

They look great! Thank you so much! I'll email you the JSONs for the remaining orders I manually input when I enter them.

vsoch commented 5 years ago

Sounds good! Can we close this issue?

hverdonk commented 5 years ago

Whoops, I thought I already did. Closed