Fossil SCM
Split forum thread into a new thread and link the two threads
2cc5acf3ba27e3e…
· opened 3 years ago
- Type
- Feature_Request
- Priority
- Immediate
- Severity
- Minor
- Resolution
- Open
- Subsystem
- —
- Created
- March 13, 2023 1:01 p.m.
The ability to split a forum thread into a new top-level thread, to avoid threadjacking the first thread, would be useful from time to time.
In essence this just means adding a "reply to new thread" option which leaves out the I-card of the response and requires a new thread title.
Before implementing this, however, we need a mechanism to provide a formal two-way link between the new post and the split-from post so that the new thread can be automatically linked back to the origin and the older thread can have a "new thread started..." link where the split-off response would have been. That's a feature we had been discussing idly for several weeks prior to the above-linked post, but which has several potential implementations and we need to get that part "right" before committing to it because we'll be stuck with it after that.
One proposed approach is demonstrated here:
tag.tagname = linkto-TARGET_UUID, tagxref.rid = RID of the link's LHS
Artifacts are from althttpd because it has forum posts and checkins in the same repo:
- forumpost: 2d80d7cf202d1dda74319ed8c289f6d3de9726dd84694813ba6c08d9be74e7cb
- checkin: 7c10fb63294880c0cb9afb80655ee06d65057806bd9d6d2a03077a4d8b06ac1a
- checkin: 46f068b88b5abed9a19af6b89972ff9af43cb15b734ec2f1c39b3fd561828daf
Add 2 links from the post to separate checkins:
$ f tag add --raw \
linkto-7c10fb63294880c0cb9afb80655ee06d65057806bd9d6d2a03077a4d8b06ac1a \
2d80d7cf202d1dda74319ed8c289f6d3de9726dd84694813ba6c08d9be74e7cb
$ f tag add --raw \
linkto-46f068b88b5abed9a19af6b89972ff9af43cb15b734ec2f1c39b3fd561828daf \
2d80d7cf202d1dda74319ed8c289f6d3de9726dd84694813ba6c08d9be74e7cb
$ f sql
sqlite> select * from tagxref order by rowid desc limit 2;
30,1,612,609,NULL,2460011.0136463195086,609
29,1,611,609,NULL,2460011.0135953007265,609
sqlite> select * from tag order by rowid desc limit 2;
30,'linkto-46f068b88b5abed9a19af6b89972ff9af43cb15b734ec2f1c39b3fd561828daf'
29,'linkto-7c10fb63294880c0cb9afb80655ee06d65057806bd9d6d2a03077a4d8b06ac1a'
Query FROM → TO:
select substr(bfrom.uuid,1,12), '-->', substr(bto.uuid,1,12)
from blob bfrom, blob bto, tagxref x, tag t
where bfrom.rid=x.rid
and x.tagid=t.tagid
and t.tagname = 'linkto-'||bto.uuid
;
result:
'2d80d7cf202d','-->','46f068b88b5a'
'2d80d7cf202d','-->','7c10fb632948'
Query TO ← FROM:
select substr(bto.uuid,1,12), '<--', substr(bfrom.uuid,1,12)
from blob bfrom, blob bto, tagxref x, tag t
where bto.rid=x.rid
and x.tagid=t.tagid
and t.tagname='linkto-'||bfrom.uuid
;
result:
'2d80d7cf202d','<--','46f068b88b5a'
'2d80d7cf202d','<--','7c10fb632948'
Comments (2)
The ability to split a forum thread into a new top-level thread, to avoid threadjacking the first thread, would be useful from time to time.
In essence this just means adding a "reply to new thread" option which leaves out the I-card of the response and requires a new thread title.
Before implementing this, however, we need a mechanism to provide a formal two-way link between the new post and the split-from post so that the new thread can be automatically linked back to the origin and the older thread can have a "new thread started..." link where the split-off response would have been. That's a feature we had been discussing idly for several weeks prior to the above-linked post, but which has several potential implementations and we need to get that part "right" before committing to it because we'll be stuck with it after that.
One proposed approach is demonstrated here:
tag.tagname = linkto-TARGET_UUID, tagxref.rid = RID of the link's LHS
Artifacts are from althttpd because it has forum posts and checkins in the same repo:
- forumpost: 2d80d7cf202d1dda74319ed8c289f6d3de9726dd84694813ba6c08d9be74e7cb
- checkin: 7c10fb63294880c0cb9afb80655ee06d65057806bd9d6d2a03077a4d8b06ac1a
- checkin: 46f068b88b5abed9a19af6b89972ff9af43cb15b734ec2f1c39b3fd561828daf
Add 2 links from the post to separate checkins:
$ f tag add --raw \
linkto-7c10fb63294880c0cb9afb80655ee06d65057806bd9d6d2a03077a4d8b06ac1a \
2d80d7cf202d1dda74319ed8c289f6d3de9726dd84694813ba6c08d9be74e7cb
$ f tag add --raw \
linkto-46f068b88b5abed9a19af6b89972ff9af43cb15b734ec2f1c39b3fd561828daf \
2d80d7cf202d1dda74319ed8c289f6d3de9726dd84694813ba6c08d9be74e7cb
$ f sql
sqlite> select * from tagxref order by rowid desc limit 2;
30,1,612,609,NULL,2460011.0136463195086,609
29,1,611,609,NULL,2460011.0135953007265,609
sqlite> select * from tag order by rowid desc limit 2;
30,'linkto-46f068b88b5abed9a19af6b89972ff9af43cb15b734ec2f1c39b3fd561828daf'
29,'linkto-7c10fb63294880c0cb9afb80655ee06d65057806bd9d6d2a03077a4d8b06ac1a'
Query FROM → TO:
select substr(bfrom.uuid,1,12), '-->', substr(bto.uuid,1,12)
from blob bfrom, blob bto, tagxref x, tag t
where bfrom.rid=x.rid
and x.tagid=t.tagid
and t.tagname = 'linkto-'||bto.uuid
;
result:
'2d80d7cf202d','-->','46f068b88b5a'
'2d80d7cf202d','-->','7c10fb632948'
Query TO ← FROM:
select substr(bto.uuid,1,12), '<--', substr(bfrom.uuid,1,12)
from blob bfrom, blob bto, tagxref x, tag t
where bto.rid=x.rid
and x.tagid=t.tagid
and t.tagname='linkto-'||bfrom.uuid
;
result:
'2d80d7cf202d','<--','46f068b88b5a'
'2d80d7cf202d','<--','7c10fb632948'
Confirmed bug: the Contact email entered in a ticket is ignored if manually entered and a default exists for the user. e.g. a user's account has email address [email protected] but the user enters [email protected] when filling out the ticket. When previewing or saving the ticket, their manual entry is lost and [email protected] is used. Editing the ticket with the alternate address works.