specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
65 stars 36 forks source link

Add Batch Editing to Specify 7 #3136

Open grantfitzsimmons opened 1 year ago

grantfitzsimmons commented 1 year ago

This has a large scope, but it would be great to have a "Must Match"-like interface that allows you to select "Override matched records" so that it would replace the data in the record it matches. This would be useful for doing batch-updating for things like Taxon records when doing an initial import, or batch-updating in general.

maxpatiiuk commented 1 year ago

This is a great idea! Jason and I talked about it two weeks ago, and Jason was going to take a look (if he has any free time) The code change for this is to suppress the "This value must be unique" error message, in favor of overriding the original record - sounds easy given that it would essentially allow for batch editing!

grantfitzsimmons commented 1 year ago

Similar to #2792

grantfitzsimmons commented 11 months ago

Use cases are visible on the Community Forum: https://discourse.specifysoftware.org/t/batch-editing-for-specify-7/847/4

grantfitzsimmons commented 11 months ago

CC'd from Slack for future reference

More batch editing requests have come in from users, and I feel we should discuss again the approaches we could take.

@specify/developers Devs, can we talk about how we are going to integrate this into our plan going forward (post-7.9.3)?

We have specific use cases given to us by University of Michigan, University of British Columbia, Delaware Museum of Nature and Science on the forum (linked above).

Eyal in Jerusalem wants to batch update the default taxonomy tree species names so that they use the local names instead, which could also be accommodated if this were to be resolved.

We also have plenty of user requests from committees discussing repatriating coordinates and other data from Symbiota and other sources that could be accommodated if we allowed updating records rather than creating new ones in the database.

grantfitzsimmons commented 10 months ago

Jordi from MCNB wanted to update the type status for a range of Determinations using the WorkBench, but this could not be done without this feature.

https://trello.com/c/AvKKFEid/85-workbench-issue

grantfitzsimmons commented 8 months ago

Scenario

The Fish Collection utilises a YesNo field in the determination table to indicate whether a given determination is on the Label.

Issue

The YesNo field does not operate like the Specify Present/Current field, which the system only allows to be ticked for one determination (as expected). The YesNo Label can be ticked for multiple determinations, however, there should only be one Label determination per object. When new determinations are loaded in bulk via the workbench that are also Label determinations (so the YesNo field is ticked in the load), we end up with multiple determinations marked as the Label determination.

image

I have tried to use Batch Edit in S6 to modify the tick-box of the existing records that now should be set to False, however, I can’t seem to do that. In fact, using the above record as an example, when I switch from the query view to Batch Edit, not only does the ‘old’ determination disappear, but the determination fields I am trying to edit are greyed out.

image

image

So at the moment our only solution seems to be to edit these records manually via the front end, which is a bit of an overhead (as mentioned before we do NOT have access to SQL backend loads). Is there anything I have done incorrectly in the Batch Edit? Or can you think of any other workarounds to make this process a bit more efficient?

Reported By: CSIRO on Asana

grantfitzsimmons commented 5 months ago

I think I know that it's not currently possible, but we were wondering if batch editing can be applied to attachments, particularly collection object attachments.

We're beginning to add specimen images to our database, many with metadata such as photographer, copyright holder, licensing, etc. Some of that metadata can change (or be discovered) over time, so it would be nice to have batch editing on the attachments so that we can update many records at once.

Requested by: Jon Fong at the California Academy of Sciences

grantfitzsimmons commented 5 months ago

For more context from @maxpatiiuk:


For more context, search for Batch Edit in this document - https://docs.google.com/document/d/1VONjFZZJJ8N8qtoJOE7Ax0oXN1Qs538rlXxlr1Nxee4/edit#


Batch Editor Brainstorming now


Next is batch editing in query results for a single table. Dependent relationships can be edited from the interface but independent relationships would be opened in a dialog from a QCBX to show that editing is taking place for all associated records.

Batch editing UI will be a combination of WorkBench and subview. If the user wants to do a search & replace function for all results returned, we could add a warning before running that action to let the user know they need to fetch all results before making that action.


See also some notes from Jim - https://docs.google.com/document/d/1VRW8KiwjU6BTru8yvauKoH_Df0wFQKHoDhqr9snE5_8/edit

Also, review the Batch Editing github project for some use cases - https://github.com/specify/specify7/projects/15#card-87570424

Also, take a look at Specify 6 batch editor (we are aiming for something much better and a bit different here, but still good to be aware of prior art)


As a preliminary step, @melton-jason will take a look at the workbench code to see if it can be modified to enable (at least) limited batch editing capability by lifting the restriction on records from base table always being new records

This would likely accompany UI changes were user can enable an "Upload mode" or an "Editing mode" and maybe even how they want to resolve ambiguities related to edits made (i.e, delete, update reference, update source)


From @grantfitzsimmons:

However, are there also plans to have the option to “undo” “rollback” the batch editing? (P.S. you can do this in Symbiota).

We need to make sure we include the ability to "undo" a batch edit in the interface

bronwyncombs commented 5 months ago

Support for editing table attachment metadata requested by Jon @ California Academy of Sciences Ichthyology

I think I know that it's not currently possible, but we were wondering if batch editing can be applied to attachments, particularly collection object attachments. We're beginning to add specimen images to our database, many with metadata such as photographer, copyright holder, licensing, etc. Some of that metadata can change (or be discovered) over time, so it would be nice to have batch editing on the attachments so that we can update many records at once. I imagine it's not as simple as flipping a bit here or there to make it possible? If not, it's something to put on your to-do list.