Fossil Forum

Feature Request: Method to rename or split thread
Login

Feature Request: Method to rename or split thread

Feature Request: Method to rename or split thread

(1.1) Originally by ravbc with edits by Richard Hipp (drh) on 2018-08-23 14:07:55 from 1.0 [link] [source]

Is there planned (or maye even already possible) a method to change thread's original title? Or maybe split a part of conversation into a new thread (possibly with some mark in the original thread at the place of split)?

We already have a good example why it could be useful in the form of topic: Did you intend to delete the link to Jim Schiff's book? - it driffted away very much from its subject and consists of several quite independent threads.

(2.1) By Warren Young (wyoung) on 2018-08-23 14:29:22 edited from 2.0 in reply to 1.0 [link] [source]

method to change thread's original title

EDIT: drh's later post shows that this is currently possible for the first post in a thread. I've removed the rest of my thoughts on this, since they were made on an incorrect premise, that being that you'd need to store a title edit the same way you do a post body's edit. The title edit isn't being handled the same way.

split a part of conversation into a new thread

Why not just start a new thread and reference the old one from the first line or two of your new post? You can refer to an existing thread with a /forumpost/abcd1234 link. Since that scrolls down and highlights a particular post, you can even refer to one of the leaves of the discussion, if pointing to the top would be less helpful.

You can make Fossil give you that URL fragment by clicking the [link] text on the dateline for each post. Here's a link to my latest post in the thread you're referencing.

I did just that here, for a different thread.

We already have a good example why it could be useful

As contentious as that thread is, I think it's still holding together. It started with a perceived problem, and the responses are all trying to get at some solution or other to that problem. We'll see who shows up with an implemented solution first. :)

If I am the first to do so, I'll be announcing my solution in a new thread, for what that's worth.

(6) By ravbc on 2018-08-23 14:56:05 in reply to 2.1 [link] [source]

Why not just start a new thread and reference the old one from the first line or two of your new post?

Of course I can do it, but then, from the perspective of the old thread, there will just be a sudden end of conversation. So when someone later come to read it, he/she will be confused what realy happend (even active followers could overlook the new thread, especially when they don't subscribe to mail-notifications). Of course one can remedy this by manually adding a "last post" in original thread with link to the new one, but when something must be done by hand, then in most cases it won't happen at all ;-)

In addition, the availability of the splitting mechanism would encourage its use, and to simply split too long (or too much off-topic) threads into parts. Or maybe not. Maybe even there should be no encouragement... ;-)

(9) By sean (jungleboogie) on 2020-11-18 02:02:56 in reply to 6 [link] [source]

Could you possibly explain or demonstrate how it would be confusing to split threads?

My example:

"Hey all, this is off topic. I started a new thread here" <--This would be a link like Warren mentioned.

on "new thread":

this is a continuation of "old thread"

(10) By ravbc on 2020-11-18 10:18:05 in reply to 9 [link] [source]

The confusion will arise when there won't be such links between threads. And as I wrote before:

Of course one can remedy this by manually adding a "last post" in original thread with link to the new one, but when something must be done by hand, then in most cases it won't happen at all ;-)

As the history of this forum shows I was partially right: links between threads are rare. But the main reason is that people don't even try to split threads - probably because it takes a lot more work than simply answering in the same thread. So we have less confusion from split threads, but more clutter from not using thread splitting. :-/

And "all it needs" is additional button "answer in new thread"... ;-)

(11) By Stephan Beal (stephan) on 2020-11-18 10:31:12 in reply to 10 [link] [source]

And "all it needs" is additional button "answer in new thread"... ;-)

If this is to be implemented (i'm not arguing for or against it), that option should probably (in my current opinion) be a checkbox in the response editor and checking it should force the user to supply a new title for the thread. If the forked-from post's title is retained, more confusion would ensue as multiple threads with the same title are active at once. (Nothing's stopping that from happening now, but in practice it hasn't been an issue.)

(12) By ravbc on 2020-11-18 11:46:37 in reply to 11 [link] [source]

Thank you Stephan for the comment. The "all it needs" in my comment was put in quotation, because I realize that, contrary to the description, the mechanism is not so trivial to implement. Unfortunately my skills are insufficient to implement it, otherwise I would have done it 2 years ago instead of posting this request. :-(

(3) By Richard Hipp (drh) on 2018-08-23 14:11:10 in reply to 1.1 [source]

When editing the original post, you have the opportunity to change the thread title.

To illustrate, I just now changed the title of this thread from

[Feature Request] Method to rename or split thread

to

Feature Request: Method to rename or split thread

(4) By ravbc on 2018-08-23 14:37:26 in reply to 3 [link] [source]

When editing the original post, you have the opportunity to change the thread title.

Ok, I should have expected it's already done ;-) Thank you!

So now only the thread-spliting part left... ;-)

(5) By Warren Young (wyoung) on 2018-08-23 14:43:24 in reply to 3 [link] [source]

I'm beginning to see how this works, which is different than I thought in my initial reply to this thread.

What I don't see is how all of the event.comment values were updated so that a lookup on any of the posts in this thread will return the corrected value?

$ cd .../forum-checkout
$ fossil sql
sqlite> select comment from event;
....
'Post: Feature Request: Method to rename or split thread'
'Reply: Forum password reset'
'Edit: Feature Request: Method to rename or split thread'
'Reply: Feature Request: Method to rename or split thread'
'Reply: Feature Request: Method to rename or split thread'

The Post is the OP, the Edit is you, and the trailing two Reply events are the two replies to this thread before this one. Why aren't they showing the original title?

(7) By Richard Hipp (drh) on 2018-08-23 15:35:48 in reply to 5 [link] [source]

What I don't see is how all of the event.comment values were updated

The code to update the EVENT table is in manifest.c lines 2551 through 2565, if that is what you are asking about.

(8) By OgunFossil on 2020-11-17 22:40:40 in reply to 3 [link] [source]

Have just noticed that while replying to a renamed thread, the thread title is still the original.

The new title appears when viewing the thread, in the forum index, timeline and search results, and when editing the first post for a second time - just not on the reply pages('/forumedit' and '/forume2').

Changing this query seems to make the problem go away:

Index: src/forum.c
==================================================================
--- src/forum.c
+++ src/forum.c
@@ -1167,11 +1167,17 @@
   }
   fpid = symbolic_name_to_rid(PD("fpid",""), "f");
   if( fpid<=0 || (pPost = manifest_get(fpid, CFTYPE_FORUM, 0))==0 ){
     webpage_error("Missing or invalid fpid query parameter");
   }
-  froot = db_int(0, "SELECT froot FROM forumpost WHERE fpid=%d", fpid);
+  froot = db_int(0, "SELECT IFNULL(\n"
+                    " (SELECT MAX(fpid) FROM forumpost WHERE froot = (\n"
+                    " SELECT froot FROM forumpost WHERE fpid=%d\n"
+                    " ) AND firt IS NULL AND fprev IS NOT NULL)\n"
+                    " ,(SELECT froot FROM forumpost WHERE fpid=%d)\n"
+                    ")", fpid, fpid);
+  
   if( froot==0 || (pRootPost = manifest_get(froot, CFTYPE_FORUM, 0))==0 ){
     webpage_error("fpid does not appear to be a forum post: \"%d\"", fpid);
   }
   if( P("cancel") ){
     cgi_redirectf("%R/forumpost/%S",P("fpid"));

..but there's stuff in forum_display_thread that looks like it could do the same thing (get the latest fpid of froot) so maybe it should be a code/programmatic thing instead of a query, or a different/better query than this suggestion.