sfu-dhil / wphp

Women's Print History Project database front end.
https://womensprinthistoryproject.com/
GNU General Public License v2.0
1 stars 8 forks source link

Fix Signed Author field inconsistencies for Anonymous titles #360

Closed kkatemoffatt closed 11 months ago

kkatemoffatt commented 11 months ago

What isn’t working as expected on the website?

We have some inconsistencies with our signed author field for Anonymous titles that have already been verified that we're hoping you can mass adjust so we do not have to edit them all by hand.

We would like to adjust all signed author field entries for verified titles that say "Anonymous." (with or without the capital A, with or without a period at the end) to "[Anonymous]" (no quotations). We would also like to adjust all blank signed author fields (with no input) for verified titles to "[Anonymous]" (no quotations).

If you encountered an error message, please copy the relevant details or take a screenshot and paste it below.

N/A

What is the URL of the page where you encountered the bug?

N/A

What steps did you take before you encountered the bug?

N/A

What browser, operating system, and device were you using when you encountered the error?

N/A

Additional information

Here is an example of a verified title where the signed author field should change from "Anonymous" to "[Anonymous]": https://womensprinthistoryproject.com/title/13290

andrew-gardener commented 11 months ago

Hi Kate,

I've updated 2690 records with this change.

There are 23 edge cases that start with Anonymous that I didn't updated (ex: Anonymous; Edited By the Countess of Morley).

It might be worth going through and deciding what to do by hand?

https://womensprinthistoryproject.com/title/1382 https://womensprinthistoryproject.com/title/1386 https://womensprinthistoryproject.com/title/2217 https://womensprinthistoryproject.com/title/3031 https://womensprinthistoryproject.com/title/4223 https://womensprinthistoryproject.com/title/4838 https://womensprinthistoryproject.com/title/5606 https://womensprinthistoryproject.com/title/5607 https://womensprinthistoryproject.com/title/7080 https://womensprinthistoryproject.com/title/8178 https://womensprinthistoryproject.com/title/8947 https://womensprinthistoryproject.com/title/9064 https://womensprinthistoryproject.com/title/9119 https://womensprinthistoryproject.com/title/13437 https://womensprinthistoryproject.com/title/15258 https://womensprinthistoryproject.com/title/15552 https://womensprinthistoryproject.com/title/15675 https://womensprinthistoryproject.com/title/15678 https://womensprinthistoryproject.com/title/15896 https://womensprinthistoryproject.com/title/15909 https://womensprinthistoryproject.com/title/16095 https://womensprinthistoryproject.com/title/18147 https://womensprinthistoryproject.com/title/21321

andrew-gardener commented 11 months ago

Also just for historical bookkeeping (you can ignore)

/* find records */
SELECT * 
FROM title 
WHERE (signed_author LIKE '_nonymous_' OR signed_author LIKE '_nonymous' OR signed_author = '' OR signed_author IS NULL) 
AND finalcheck IS TRUE;

/* update records */
UPDATE title
SET signed_author = "[Anonymous]"
WHERE (signed_author LIKE '_nonymous_' OR signed_author LIKE '_nonymous' OR signed_author = '' OR signed_author IS NULL) 
AND finalcheck IS TRUE;

/* find edge cases */
SELECT CONCAT('https://womensprinthistoryproject.com/title/', id)
FROM title 
WHERE signed_author LIKE '_nonymous%' 
AND finalcheck IS TRUE;
mnl101 commented 11 months ago

perfect we will do that