Resolved comments disappear. Bug or by design? + our Comments database set-up

We are building our own ‘Comments’ database. Because:

  • The current notifications in Fibery are not helpful for a user. Since you can’t turn on/off what you want to receive. When we create our own set-up, we have more flexibility.
  • We want to have one overview with all comments/questions that still needs to be answers. Like the ‘Inbox’ that ClickUp has.
  • We want to visually see which comments still need an answer and which ones are already answered. That was also possible in ClickUp.

With the normal built-in comment solution of Fibery these last two are (as far as I know) currently not possible.

So we’ve created a comment database + a ‘thread’ database. It’s not really a thread, but you get the point :slight_smile:

This is our set-up :arrow_down:

Sometimes it’s really helpful to have a thread. Especially when the ‘comment description’ contains multiple questions and you want to answer them per question. We can more or less achieve that if we use Fibery’s inline comments.

image

The problem though is that if you resolve the comment, the whole comment is gone. I was expecting that the comment should go to the resolved tab. But I can’t find the comment anymore after resolving :sweat_smile:

Questions

  1. Is it a bug or by design that a comment gets deleted after resolving it?
  2. Do you see any improvements in this set-up? I would really love to have a thread with answers but can’t find a nice way to do that. The feed view is very handy so that you don’t need to open every answer. But we can’t have a hierarchical feed view unfortunately :sweat_smile:
2 Likes

It would be really helpful if we could have functionality like this :arrow_up:. So quote a part of a text so that you can simulate a thread :smile:

Related, hopefully: Merge Comments and References in one common Stream for better flow - #2 by mdubakov

1 Like

Yes the video that @mdubakov shared looks great. I really hope that we will have a good notification / comments / communication functionality in Fibery in the near future. That’s one of the biggest bummers when you migrate from ClickUp to Fibery. We are building several workarounds to achieve it but it feels really clumsy :see_no_evil:

1 Like

We just found out that we will face other problems when we will use a self build comment solution via a separate comments database.

  • We can’t work with guests anymore since they need member permissions to create a comment (currently they are able to add a comment)
  • In the future with new permission model, we will often say ‘you will only have access to an entity when you are assigned to the entity’. Problem is that users either have access to all comments (we don’t want that) or only to their own + assigned comments. When there is a thread with multiple people, they probably will miss part of the thread because of permissions.
  • But the main problem is that we are really hoping for a good native function in Fibery. If Fibery fixes that, I don’t see how we can migrate our clients from our manual solution to Fibery’s native solution. Having both solutions (native + manual comment solution) would be really messy and far from ideal.

So we want to try something else.

Would this temporary set-up will be possible until we have a proper native notification solution :arrow_down:

  • Create a database called ‘Notifications’
  • When a comment is created in a task, then create an entity in the notification database (I thought @ChrisG mentioned earlier that this could be achieved via a script).

So when a comment is created in a task
image

Then add an entity in the Notification database.


Name = formula → linked task
Task = ‘parent’ of the comment → should be set via script
Created by = user that created the comment → should be set via script
State = default open
Assignee = user that is mentioned in the comment → should be set via script

Then we can create a view with all ‘open comments’. User can open the linked task to answer the comment. The notification view itself will not cover all our specific needs. But at least the user will be able to manually administrate if a comment is answered or not.

It still feels clumsy but the current notification solution is driving us nuts since it cost way to many time and headspace and ruins our productivity.

Since we can’t determine which notifications we do / don’t want and can’t seperate:

  • Notifications we only want to know (assigned to)
  • Notifications we actually need to do something with (comments we need to answer)
  • Notifications we need to look into or only want to know (mentioned)
  • Notifications from formulas and automations that are broken

So at least with this ‘Notification database’ we have a clear overview from comments that we need to answer :sweat_smile:

And finally still curious if it’s a bug or by design that resolved comments completely disappear :arrow_down:

2 Likes

I think you can achieve what you’re describing (if it turns out that we don’t deliver improvements in notifications in the short term)

Possible with automations (trigger is: entity lined to …Comment)

No scripting needed, relation can be set with a formula at time of creation, and Name can just be a formula field anyway.

No scripting needed. The linked Comment’s author is available via a formula

Single select with default value.

Yep, will need a script to extract the person @mentioned in the comment.

You would be doing the reverse of what is described here making use of the info in this topic.

So:

  • Get the comment contents (via comment id and secret)
  • Pattern match for any @mentions to get the User id(s)
  • Add those ids to the Assignees collection
1 Like

Needless to say, but it would be really awesome if we don’t need this workaround for notifications :star_struck:

We didn’t knew that; awesome! That will solve a lot of our problems :partying_face::partying_face:

I’m flattered because you think I can write this script myself. But after reading both posts and staring at the script, I’m afraid I still need a little help from ChrisGPT if possible :sweat_smile:

And one extra question: would be great if we can put the URL to the specific entity of the task in the URL field via the automation.

The reason for that is that we in fact don’t only have tasks; we have

  • Normal tasks
  • Subtasks
  • Content items
  • Dev tasks

etc. where we want the same logic.

So in the database you will see the linked task. But in our view it would be better to only show the URL from the linked entity so that it is a clean view for the user (instead of seeing all databases that can be possibly linked to that notification)

But how can we set the URL of that linked entity via the automation?

Thanks again!

1 Like

Here’s what I might suggest: create a db as shown in the following gif:
firefox_oZO70DvZST

(it doesn’t actually have a relation to the Task db, which makes it easier to scale if you want to make it work for multiple databases)

There are two automations:

  • the first (in Task DB) runs when a Task gets a new comment, and creates a new Comment record:

Script as follows:

const fibery = context.getService('fibery');
const utils = context.getService('utils');
for (const entity of args.currentEntities) {
    const entityWithExtraFields = await fibery.getEntityById(entity.type, entity.id, ['Comments']);
    const comments = entityWithExtraFields['Comments'];
    const lastComment = comments.pop();
    const comment = await fibery.getEntityById('comments/comment', lastComment['Id'], ['Author']);
    await fibery.createEntity('Comment system/Comment record', {
        'Name': entity['Name'],
        'URL': utils.getEntityUrl(entity.type, entity['Public Id']),
        'Author': comment['Author']['Id'],
        'Comment secret': lastComment['Document Secret']
    });
}
  • the second (in the Comment record DB) runs when a record is created and extracts the mentions information:

Script as follows:

const fibery = context.getService('fibery');

function getMentions(text) {
    const regex = /(?<=\[\[#\@[a-f0-9-]+\/)[a-f0-9-]+/g;
    const found = text.match(regex);
    return found;
}

for (const entity of args.currentEntities) {
    const entityWithSecret = await fibery.getEntityById(entity.type, entity.id, ['Comment secret']);
    const content = await fibery.getDocumentContent(entityWithSecret['Comment secret'], 'md');
    const matches = getMentions(content);
    for (const match of matches) {
        await fibery.addCollectionItem(entity.type, entity.id, 'Mentions', match);
    }
}

I hope you can comprehend what they are doing and I hope it gets you close to what you need.

Thank you so much! It works like a charm!

Two questions left:

  • Would it be possible to tweak the entity URL in a way so that the systems thinks it’s an ‘internal link’ and therefor opens the entity in split screen/side bar like we currently have with normal notifications? With the normal URL every entity opens in a new tab. When you have a lot of notifications to resolve, it would be awesome if we can somehow show the task in split screen.

Edit: when I check de comment URL in normal notifications, I can see that there is an anchor in the URL.

That anchor will bring you directly to the specific comment.

https://acceleright.fibery.io/DB_taken/Taak/Automatiseren-wat-er-bij-een-Calendly-event-gedaan-moet-worden-511/anchor=cb83bb7b-8d20-493e-a038-8d5bee3ab9bf

Would it be also possible to link that ULR? And if we can open it splitscreen that would be really awesome :grin:

  • And don’t know if it’s by design or a bug that resolved comments don’t go to the resolved tab?

image

2 Likes

I don’t think the URL field can be made to open a link in an adjacent panel, but I’ll note that as a feature request.

If you modify the code (for the second automation script) as follows, the URL will be appended with an anchor which will take the user to the comment (or at least to the first paragraph in the comment if there are multiple).
(note: this may not be the paragraph that contains a specific user mention)

const fibery = context.getService('fibery');

function getMentions(text) {
    const regex = /(?<=\[\[#\@[a-f0-9-]+\/)[a-f0-9-]+/g;
    const found = text.match(regex);
    return found;
}

function findAnchor(text) {
    const regex = /(?<=^<p data-guid=")[a-f0-9-]+/g
    const found = text.match(regex);
    return found;
}

for (const entity of args.currentEntities) {
    const entityWithSecret = await fibery.getEntityById(entity.type, entity.id, ['Comment secret','URL']);
    const content = await fibery.getDocumentContent(entityWithSecret['Comment secret'], 'md');
    const matches = getMentions(content);
    if (matches) {
        for (const match of matches) {
            await fibery.addCollectionItem(entity.type, entity.id, 'Mentions', match);
        }
    }
    const contenthtml = await fibery.getDocumentContent(entityWithSecret['Comment secret'], 'html');
    const anchor = findAnchor(contenthtml);
    await fibery.updateEntity(entity.type, entity.id, { 'URL': entity['URL'] + '/anchor=' + anchor });
}

Comment: as well as adding the anchor functionality, I added a bit of code to prevent errors which would occur if there were no @mentions in the comment.

Certainly seems like not the ideal behaviour(!)
Will look into this.

I checked, it’s a known bug

1 Like