In board view use Description field toggle to show if entity has a description (like Trello)

As someone that’s trying to migrate our Trello use cases to Fibery boards I would like to be able to view if an entity has a description or not, similar to how Trello does it with their cards.

YlRnEdBnpm

I imagine this could be enabled using the Fields dropdown where if Description is toggled a similar icon is shown on cards where there Description field is not empty.

I feel like I am really close to hacking together an automation based workaround for this kind of feature.

It’s made largely complicated by the fact that you can’t for some reason use automations to check for when the Description field is updated. :confused:


Setup:

1. Add a single select field named: Has Description
2. To this field add a single option with the value: ...
3. Set the icon of this field to one of the “write” or “paper” emojis
3. Create an automation rule that When entity is updated Then run script:
3. Create an automation rule On Schedule every one hour Then run script:

const fibery = context.getService('fibery');
for (const entity of args.currentEntities) {
	const description = await fibery.getDocumentContent(entity.Description.Secret);
    await fibery.updateEntity(entity.type, entity.id, {
        'Has Description': description ? "..." : null,
    });
}

All this script does is when an entity is updated every one hour check if that entity has a value for Description and if so sets the Has Description single select to the ... value.

Which on the board view looks like this:

image

The Problem/Bug:

The above script doesn’t actually work because I can’t figure out how to clear the value of a single-select field (ie. set it to No value).

If someone can help me figure this out I think we might have an acceptable workaround.

NOW FIXED see post #7

How about this for a fugly workaround :slight_smile:

[DELETED]

Of course, out of curiosity, I have to ask what you are using to trigger the automation, because it’s not yet possible to trigger on rich-text changes?

I have to give you props, because while that is truly hideous - it could work.

Ok, well that’s an even larger problem. LOL

I’m guessing this somewhere on the roadmap? Because I don’t see an existing feature request for “trigger on rich-text changes” . This is the closest similar thread:

EDIT: A workaround for this workaround may be to use On Schedule trigger?

1 Like

At this point I’m three workarounds deep into getting this to work so I might just give up but I guess I could use this type of Scheduled trigger below for the automation.

The downside is that the “Has Description” flag will be only set one way, that is to say it will only show that a description was added at some point and not update if the description is removed.

Quick update:
It seems like the API does support clearing the value of a single-select using null, but problem lies with the .updateEntity function.

The devs are working out what the fix is, but in the meantime, you could use the following (slightly less fugly) workaround:

[DELETED]

Fixed now, see below.

Hello.
I’ve fixed the issue with script failure on setting null to single-select field via fibery.updateEntity api. It should work ok now.
Sorry for inconvenience.

2 Likes