Page 1 of 1
Rich Text "Add Record Link" updates linked record (bug?)
Posted: 21 Dec 2021 23:18
by Mark1834
I was puzzling over the Records Window showing recent Updated timestamps for some Individuals, when I know I hadn't changed anything. Experiments tied it down to the fact that a record is shown as updated if a rich text link to it is created.
This simple script creates a Note with a link to each Individual in the project. Run this, and every Individual now has the current date and time as its "Updated" value!
Code: Select all
rt = fhNewRichText()
p = fhNewItemPtr()
p:MoveToFirstRecord('INDI')
while p:IsNotNull() do
rt:AddRecordLink(p)
rt:AddText('\n')
p:MoveNext()
end
pN = fhCreateItem('NOTE')
pT = fhCreateItem('TEXT', pN)
fhSetValueAsRichText(pT, rt)
That feels like a bug to me, so I'll report it to CP in the morning.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 22 Dec 2021 09:14
by Mark1834
Hmm - CP got back to me very quickly (probably fairly quiet for new reports this week). It is by design, as the links count has been updated, but they will "review" my observation that the user update record is lost.
I have an unpublished plugin that takes a snapshot of update stamps and restores them after a mass change (such as creating UniqueIDs), so that will be my workaround if I don't want those updates showing.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 22 Dec 2021 10:32
by tatewise
That sounds similar to a problem I reported in 2016 to which CP gave no answer:
'Removing Link sets Updated in Target Record' #554962
i.e.
If a link from record A to record B is removed, then the Updated time-stamp is changed for record A as expected, but it is also changed for record B even though record B has not been altered.
Perhaps the explanation is the change in the Links Count for record B.
So I suspect in your linked Individual case, if any Individual link is removed from that Rich Text Note record, then the Updated timestamp of the Individual will change. If you delete the Rich Text Note record, then all the linked Individuals will have their Updated timestamp changed.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 22 Dec 2021 10:45
by Mark1834
Yes, that's exactly what happens, so on the CP rationale, FH is behaving as designed.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 23 Dec 2021 13:56
by David Potter
Yes I found the same issue of Individuals having their Updated Time Stamp 'updated' when inserting Individual Record Links into Research Notes, Source Records (TFS) and other places where Individual Record Links are allowed.
I see the argument both ways - but I would lean towards a change in Record Link Count should not qualify as a change in the Individuals data. I'm sure we'll see mixed opinions.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 23 Dec 2021 15:53
by LornaCraig
There is also an inconsistency between adding a link and deleting a link.
In 2016 I submitted the following to CP:
Adding a citation to Source record, or adding a link to Note record or Repository record has no effect on the updated date/time for that record, but deleting a link results in a change to the updated date/time.
This was logged with ticket #554962.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 23 Dec 2021 16:04
by tatewise
Lorna, that scenario no longer applies. It seems to have been fixed.
Adding a Citation to a Source record does now update the Source record Updated timestamp.
Similarly, linking a Repository to a Source updates the Repository record Updated timestamp.
I have not checked them all, but I suspect it is at least consistent now.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 23 Dec 2021 16:43
by LornaCraig
Ah, thanks. It may be more that a year since I last checked it, so perhaps the change was slipped in with V7.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 04 Jan 2022 14:25
by Mark1834
CP have now got back to me, and agree with my analysis. From the next revision, creating a rich text link to another record will not modify the Updated timestamp of the linked record. Creating and deleting family relationship links will continue to update the timestamp.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 04 Jan 2022 15:42
by tatewise
What about all the other 'links' that affect the various link counts? Is the proposed change creating an anomaly?
i.e.
Adding and removing a link between Repository and Source.
Adding and removing a link between Media and various records.
The only valid exception is two-way links such as those between Individual and Family records.
Re: Rich Text "Add Record Link" updates linked record (bug?)
Posted: 04 Jan 2022 18:28
by Mark1834
I think the CP position is to consider the relevance of the link to the linked record. Links between the core record types (individual to family, source to repository, etc) are relevant, so should count as updates.
However, creating a rich text link to a record is no different to creating a link in a web page. The anomaly is that one currently updates the linked record, and the other doesn’t.
It’s always possible for a user to argue a different position to that taken by the authors of course, but I think CP have got the right balance here, with a coherent and logical distinction.