ericberman / MyFlightbookWeb

The website and service for MyFlightbook
48 stars 18 forks source link

Enhance interactive Select Flights feature with UPDATE for Logbook and Check flights listings #548

Closed KayRJay closed 4 years ago

KayRJay commented 4 years ago

The bulk Check Flights feature is very helpful. I've now found I have a lot of flights that need a change (adding an instructor).

There is an option in the Logbook to delete or request signatures for a set of flights (thanks for implementing the idea in #382):

Screen Shot 2020-03-22 at 2 15 15 PM

But unfortunately, you can't bulk Edit flights. The only way, I believe, to do a bulk update is via an Excel export and import. That's a bit cumbersome, with eight steps (per the FAQ) to say the least.

The dropdown menu would have an option "Edit selected flights". MFB would then open the Edit page with no filled in fields. The user could enter values anywhere and when he pressed "Update flight(s)" all selected flights would be changed. Easy peasy (for the user, maybe not you?).

This same type of Select flights feature could appear on the Check Flights page ... I could easily delete or fix all my flights at once.

ericberman commented 4 years ago

Appreciate and understand the intent of the request, but this is an insane amount of work.

Plus doing this would only allow you to make bulk edits where the change is the same for each flight; anything heterogeneous wouldn't work. (E.g., I went through and bulk edited my instructor names as well today - but I have multiple different instructors over the years.)

The bulk edit process works fine and is more precise - especially since you can review each change before its committed.

ericberman commented 4 years ago

BTW, the most compelling scenario here, I think, is a bulk change of aircraft from one to another. I might consider making that specific change.

But otherwise, this could be insanely dangerous. E.g., if you type something into the comments field, do you overwrite ALL of the flights with the identical newly-entered comments? Ditto route or any time field or count field. Almost guaranteed to be the wrong thing 90+% of the time. So you wouldn't be able to use the standard edit page. You'd need to be super precise about what fields to change.

Another, possibly better, way would be to implement a search-and-replace function: "find flights that meet criteria X, and for those flights change value Y to be xxx". But that too is a whole new UI to specify which value to change, to do validation, etc.

KayRJay commented 4 years ago

I respect that it might be a lot of work, and that there are indeed risks.

Those same risks exist in any database environment. Forgetting a WHERE clause (in "Autocommit mode) could be deadly. The risk exists wrt MyFlightBook when doing an Excel export and import (or doing any unreversable thing). In a database or in MFB, these risks are a reason why backups are necessary.

You backup the entire database. You offer a backup service. "Cheap" users who don't pay for the backup service can export to Excel often (especially before a bulk update). You could warn users to take a backup before import of an Excel file, or using the bulk interactive update. The risks, and the "solution" are the same. Take a backup and think before you act.

I don't mind (in fact, I want) to do "homogenous" updates, where all selected flights get the same value(s). That's why I selected them. And perhaps it wasn't clear in my comment ... if a field on the Edit screen is not changed/entered, you would not change the other attributes of the selected flights.

I own one aircraft. I have friends who have several. I do wonder, though who would want to do a bulk update of aircraft, and why they would want to do so (and why you consider this less risky than updating other fields).

I don't see how you "review" a change before it is committed with a bulk update. It's insanely easy to make a mistake in Excel, if that's what you're referring to. Maybe you don't often make errors in Excel, but I've done more than my share!

I imagine a generalized "search and replace" function would be a lot of work, probably more work than I outlined above.

ericberman commented 4 years ago

I understood the "if nothing is entered/changed, nothing would be updated" idea in the suggestion.

The only reason I raise aircraft mapping is because that actually does arise from time to time when I do things like clone or merge aircraft.

You review a change in bulk edit at the last step of the bulk edit process: it shows you every flight that will be changed, and for each of those flights shows you an itemized set of edits that will be performed on that flight.

KayRJay commented 4 years ago

Well, now the "bulk update of instructor name" has come up ... for both you and me!

I'll try the bulk update ... .AFTER I do a backup!

ericberman commented 4 years ago

Absolutely. And bulk edit works great. Try it...

ericberman commented 4 years ago

Just be sure to follow the FAQ.

KayRJay commented 4 years ago

It worked like a charm(though I had to scan 82 flights!).

The only issue is that the created .CSV file has some weird characters in the "Date" column. It read ""Date". I think we may have discussed this before. I'm on Mac, using Safari.

Can this be fixed?

ericberman commented 4 years ago

Those are byte markers indicating UTF-8 character encoding; it's not a bug. In fact, it's vital that I do it or else people who use Hebrew or Russian or Chinese can't round-trip (or even read the resulting download).

If you're seeing them, then my guess is that the app you used on the mac got confused about the encoding. Was that with Excel? Excel should be smart about that...

KayRJay commented 4 years ago

I use Excel 2011. Maybe it's a bug in it. Unless you know someone who knows a setting I can change? ;-)

ericberman commented 4 years ago

Wow, that's nearly a decade old! When you save, you should have an option for CSV or CSV with UTF-8. Choose the latter. If this is what you saw when you opened it, then you just need to upgrade.

KayRJay commented 4 years ago

I don't want to upgrade. Excel 2011 mostly works fine. I don't want to pay for a subscription. I suppose I could use Microsoft Live (or Open Office). I may be forced into this (and to upgrade several computers) because the new Mac OS (Catalina) won't work on all my family's computers, and I have a number of 32 bit apps that won't run on Catalina. Errg ...

Excel 2011 doesn't have a UTF-8 option. It has MS-DOS CSV and Windows CSV. Neither worked.

My workaround to not upgrading is just to edit cell A1.