* Convert a FACT from Individual record type to family record type.

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
User avatar
tatewise
Megastar
Posts: 28405
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

Mark, I have some TMG imports and the TMG Import.fhf file has the [.index] section at the beginning as normal.
That applies whether the definitions are imported local to the Project or globally in the ProgramData.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2510
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

OK, thanks. In that case, it's probably the RM-specific Alternative Name fact that's messing up the formatting somehow.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28405
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

I think you could be right.
I have some RM imports and only the ones with the _ATTR-ALTERNATE_NAME-IA definition are reversed.
Those without that fact are normal.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

Hi Mark,

Apologies for the delay in my response as I have been away for a few days. I ran the Audit RM Direct Import plugin and it reported the following:

1. Missing Citation Media: 5 records, which I now need to work out how to fix.

2. Clear Invalid... Sort Dates: 8 invalid & 23 superfluous. Some do appear to be incorrect specifically the 8 invalid which I have fixed, I checked and updated the others as appropriate to remove them from the list.

Thanks for the suggestion of running this plugin.

As requested attached is my TMG Import.fhf file.
Attachments
TMG Import.fhf
(87.08 KiB) Downloaded 47 times
User avatar
phillip_leslie
Gold
Posts: 21
Joined: 30 Jun 2022 07:49
Family Historian: V7
Location: Huddersfield, West Yorkshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by phillip_leslie »

I have checked the "missing citation media" log file and cannot find any reason why these are being reported.
I do not appear to have any media attached to the facts in TMG and when I access the record in FH I cannot see any reference to media either.
Could you explain further what problem the plug is is reporting?
User avatar
Mark1834
Megastar
Posts: 2510
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Thanks Phillip. That confirms that the TMG Import fact set is correctly formatted, consistent with the hypothesis that the fact set problems are limited to the RM Alternative Name fact.

Superfluous sort dates suggests that FH is leaving both RM and TMG sort dates in place when they are not necessary. It's not an error as such, but it does create some inconsistencies in how data are displayed. CP are aware of the issue, so it will be interesting to see what they do in FH 7.0.12 when that comes out (which probably won't be long, as it is a while since the last update).

Citation Media are an interesting one. I don't know anything about how TMG manages sources and citations, but the plugin could flag false positives if different citations have the same text, but legitimately use a different image (e.g. different pages of a book, where the detailed text has not been transcribed). As there are only a handful of them, I suggest you check them individually and add missing media manually if necessary. If the import from TMG is dropping media links, that needs to be reported to CP, as it may not have the same root cause as the RM import.
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2510
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Think our posts crossed in the ether...!

FH does not have a mechanism for identifying where the same citation from a lumped source is used to support multiple facts, so each one is managed as a separate entity. Normally, that is not a problem, as the user creates the first citation, them typically copies it to additional facts (although if the citation is subsequently edited, this needs to be done on every copy of that citation individually).

RM8 has the concept of a "shared citation", and when this is imported into FH, it has to be split into individual citations attached to each fact that it supports. There is a bug in the import code whereby the media are not copied along with the text, so only one copy of the citation has the media files linked to it. CP have identified the problem, and it will be fixed in FH 7.0.12, but that doesn't help users who have imported their data already.

The plugin attempts to fix this, by classifying citations as "equivalent" if all their text is the same (Text From Source, plus all the templated fields), listing all media attached to any copy of that citation, and flagging examples where media appear to be missing. It works well if citations are uniquely identified by their text content, but fails where the text is the same but media are legitimately different, as I explained above.

There may be an issue with the way the plugin identifies "equivalence", as it hasn't been exhaustively tested against all scenarios. I'll have a play with it tomorrow to see if I can see any problems.
Mark Draper
User avatar
tatewise
Megastar
Posts: 28405
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Convert a FACT from Individual record type to family record type.

Post by tatewise »

Mark, I have not reviewed the script, but I assume the Plugin not only tests Citations for equivalent text but also are linked to the same Source record and have the same Entry Date and Assessment, etc.

The Where Used Record Links plugin, when applied to Source records, identifies equivalent Citations in the Result Set with the same Key column number, so might be useful in these investigations. Similar but not identical Citations usually have adjacent Key numbers. The Media column identifies how many media are attached.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2510
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Source yes, assessment and date no - the same citation could have a different assessment for different facts, and those fields are about how the citation is used and interpreted, not its content.

I’m not sure what you mean about the key, but it sounds similar to my citation key (a concatenation of source number, text from source and template field contents). I’ll certainly look at that plugin to compare methodologies.
Mark Draper
User avatar
Mark1834
Megastar
Posts: 2510
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Convert a FACT from Individual record type to family record type.

Post by Mark1834 »

Thinking about the general principle, I think the best option for highlighting and correcting missing media links is not to add all media to all equivalent citations, but to identify citations with no media where one (and only one) equivalent citation does have media. Equivalent citations with different media (my pages of a book example) would be ignored, as they are unlikely to be caused by the RM import bug.

Once I’ve worked it through, I’ll post an updated plugin in the Audit RM Import thread, as we’ve rather drifted off the original topic here.
Mark Draper
Post Reply