mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 17:45:18 -05:00
Every Settings pane page now has What it is, Read more, How to use it, How the numbers are calculated, How it works in WeKan and Commits, checked against the code. Corrected where the old text no longer matched: the Translation pane pages 10 rows, its Text column is the translation key and New is the first column; Version lists all five groups and Check Version; Appearance gains its board-creation, description, date, card width, autolink, login colour and logo upload settings; Features and Feature profiles list the whole catalog; Shared labels is the menu's own label; Global Webhooks describes Internal destinations. Thanks to xet7 !
4.4 KiB
4.4 KiB
Shared labels
What it is
Labels used to belong to one board each. Shared labels (#2761, #4698) are
kept in catalogs that boards use beside their own labels, so the same label -
Urgent, Customer, Bug - has one name and one colour on every board that
uses it:
| Catalog | Where it can be used |
|---|---|
| Every board | on every board of this WeKan |
| An organization | on the boards that organization is assigned to |
| A team | on the boards that team is assigned to |
Read more
- Tag (metadata) and Controlled vocabulary on Wikipedia - a shared label is a tag from an agreed list.
- Organizations and Teams - the groups a catalog can belong to.
How to use it
Keep the catalogs (site admin)
- Open Admin Panel → Settings → Shared labels (
/admin/settings/labels). - Each row has the label's name, colour and catalog, and saves on its own: change it and press its Save, or press Delete.
- The last row adds a label: a name, a colour, the catalog (Every board, Boards of an organization or Boards of a team, and then which organization or team), and Add shared label.
The colour is picked with the same picker as a board label's - the palette swatches, at the size they have on an opened card, or any custom colour from the colour wheel.
Use one on a board
- Open a card's labels.
- Below the board's own labels, under Shared labels, are the shared ones this board may use and does not have yet.
- Click one: it is put on the card. From then on it is one of the board's labels, with a share icon instead of the edit pencil, so filters, rules, exports and the minicard treat it like any other label.
What happens afterwards:
- Renaming or recolouring a shared label in the Admin Panel changes it on every board that uses it.
- Deleting a shared label keeps it on those boards, as their own label.
- Who sees a catalog: a user is offered the "every board" catalog and the catalogs of their own organizations and teams. Another organization's label names are never sent to them.
- Who may use one: anybody who may edit the board.
How the numbers are calculated
- A name is trimmed and may be at most 100 characters (
NAME_MAXin models/lib/sharedLabels.js). - A board's copy of a shared label gets a new 6-character label id.
- An organization or team catalog is offered only while that organization or
team is active on the board (
isActiveis notfalse).
How it works in WeKan
- Rules (pure): models/lib/sharedLabels.js -
availableOn()(may this board use it),offeredTo()(the ones the board does not have yet),boardCopyOf()(the board label, withsharedLabelId) andcleanSharedLabel()(what may be saved: scopeinstance,orgorteam, a scope id for the last two, an allowed colour). - Server: server/sharedLabels.js -
the catalog collection; the
sharedLabelspublication (everything to a site admin, otherwise the instance catalog and the user's own organizations' and teams');sharedLabels.saveandsharedLabels.remove(site admin only; saving updates every board copy, removing drops only thesharedLabelIdso the copies stay as the boards' own labels); andboards.useSharedLabel(a board member with write access, for a label available on that board; the copy is added once). - Card popup: client/components/cards/labels.jade
and
labels.js. - Admin Panel: client/components/settings/sharedLabelsSettings.jade
and
sharedLabelsSettings.js. - Tests: tests/sharedLabels.test.cjs and the runtime suite server/lib/tests/sharedLabels.tests.js.