FreeUKGen / FreeBMD2

For everything related to FreeBMD2. An updated version of the original FreeBMD genealogy website.
Apache License 2.0
1 stars 0 forks source link

Implementation of save search feature #123

Closed richpomfret closed 3 months ago

richpomfret commented 4 years ago

Save search feature as member feature. To discuss exact design/requirements for this and what we might provide (time allowing) for MVP..

Pat to discuss with FreeBMD team.

PatReynolds commented 4 years ago

@Barrie, what are the design requirements for this, please? I'll ask the Documentation Team for their perspective, as users, too.

PatReynolds commented 4 years ago

Documentation team reported not using this feature. Those who tried it, were expecting a download of search results, as with FreeREG/FreeCEN. this feature (printable format) already exists in FreeBMD2.

Suggest move to post-MVP for implementation.

PatReynolds commented 4 years ago

Multi modal saves search results in an array, so will differ when changes to the database mean a different set of records are found by a search.

The resaercher therefore can compare the search at a previouis date (saved as a url, and run the same search again. Opening the new search in a window side-by-side with the previous result will allow a quick visual comparison to see whether additional records have been found.

It is possible that a new record is found (after correction, new data, etc) and a previous record is no longer found (after correction, etc) which would mean that the total records would be the same.

For MVP, this needs to be documented in the help (story #226). For later development, a facility where the new data is flagged, is a nice-to-have.

richardofsussex commented 1 year ago

Some of the core functionality has already been implemented – you can see your saved searches and your saved records, and you can run a saved search and compare the results with those you got when running the search before: image I think it would be great to get this area of functionality fully working and tidied up. This feature requires users to create a user id and log in (otherwise we have no means of logging "their" saved searches/records). We need to provide support for creating a "researcher" account (at present you have to volunteer as a transcriber to get access to this functionality), and that researchers are offered only appropriate menu options when they are logged in. Also, they need a set of navigation options within the "saved searches" area - these are currently lacking. The "saved records" page needs a toolbar to export the records. (Arguably in this case - maybe in others too - it would be helpful to offer GEDCOM as a supported export format. The users could find records in FreeBMD2, export them as GEDCOM, and load them directly into other genealogical software/sites.)

richardofsussex commented 1 year ago

@Vino-S I created a new branch for this issue based on the freebmd-development branch, but when I run it locally I don't see any opportunity to log in. I am able to log in on both test3 and beta. Is this because of code incompatibilities or is it caused by missing data files/collections?

richardofsussex commented 1 year ago

To get a login dialogue, I need to run my local copy using the 127.0.0.1:3000 address and port. Previously I was using localhost:3000. Refinery treats 127.0.0.1 as a 'local request', but not localhost.

There is a researcher registration HTML page, but its style is different from the transcriber registration page, so I plan to replace it with code similar to that in the transcriber page. I will then attempt to trap requests to save a search or search result, and redirect them to this registration page (unless the user is already logged in).

richardofsussex commented 1 year ago

Thanks to @Vino-S I have resolved my login issues. The user's Your Actions page appears, and includes Saved Entries and View Saved Searches. I can mark/save individual records in the detailed view, and their icon changes to a filled heart. However, when I select Saved Entries, I get an empty list. This code (in userid_detail.rb): image is returning an empty list, despite being passed a set of hash values. [I've realised why - my bestguesshash table hasn't been updated to reflect the contents of my bestguess table! Subsequently I hand-updated the bestguesshash table with hash values picked out from the RubyMine debugger, and this worked perfectly.] (The View Saved Searches function works fine.)

richardofsussex commented 1 year ago

I see that one requirement above has already been implemented: the default value for _personrole is "researcher".

richardofsussex commented 1 year ago

userid_details\new.html.erb says that form form_freebmd should be used for creating users in the FreeBMD project, but the corresponding form _form_freebmd.html.erb does not exist [in my development setup]. Do we need to create it?

richardofsussex commented 1 year ago

We need a variant on search_queries/_count_and_tools_menu.html.erb which takes the saved_entries as its data source.

DeniseColbert commented 1 year ago

Heart isn't getting filled on a click: not being saved?

richardofsussex commented 1 year ago

I tried saving a search in test3 and got a "page not found" error. This doesn't happen in my local testing setup: I get a "search saved " message on the current page. @Vino-S, has branch fb_123_rbl been pushed to test3?

richardofsussex commented 1 year ago

I have added the ability to export the saved records in GEDCOM format. The one field I haven't been able to include is sex. Here is an example of the output: image

richardofsussex commented 1 year ago

Note the URLs. These are patterned on the form of URLs used by FreeREG. The 'friendly' bit of the URL needs debugging: the quarter is missing. There is scope for including a textual summary of the entry as a NOTE - this could be like a citation. (Note that the WWW tag isn't an official part of GEDCOM 5.5.1, but it is used by e.g. WikiTree.

richardofsussex commented 1 year ago

@Vino-S I've just pushed this branch (fb_123_rbl), because I don't think I did that recently. Please check to see if my current code is in test3. Also, I would welcome advice on how to get the :sex field into my GEDCOM output. Thanks.

Vino-S commented 1 year ago

ready for testing in test3

richardofsussex commented 6 months ago

Save search leads to a "missing page" error (/search_queries/[UUID]/save_search), and clicking on the "Save entry" icon achieves nothing. The "Save as GEDCOM" menu item is there, but there is nothing to test it on ...

richardofsussex commented 4 months ago

One observation as I get back into this issue: I don't think it will be possible to include a person's sex in the GEDCOM output, simply because FreeBMD doesn't record this information!

richardofsussex commented 4 months ago

The District links in both the list of saved records and the entry details view for a saved record point to the UKBMD district page.

richardofsussex commented 4 months ago

Fixed the District links so they now follow the same logic as other record views.

richardofsussex commented 4 months ago

Saving a single record doesn't do anything. There should be a notification and it should appear in the list of saved records.

richardofsussex commented 4 months ago

I have added the quarter to the friendly_url procedure in bestguess.rb:

image

This will affect all friendly URLs in the BMD2 site.

richardofsussex commented 4 months ago

I notice that the District links in the side-by-side search comparison page are still pointing out to the UKBMD site: now fixed.

richardofsussex commented 4 months ago

@Vino-S and I have worked out how to get the saving of records (and of searches) to actually work. Result (for saved records) is in test3.

richardofsussex commented 3 months ago

Need to be able to 'unsave' a record by clicking on the heart icon again. @Vino-S to investigate (re-)implementing this.

Vino-S commented 3 months ago

Ready for testing in test3