`NOCANCEL` of SHOW / DIALOG also hides the form's Share action and ends with the first Save

Open
#1,956 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
backend

Research direction

The report names the SHOW and DIALOG operators, System.formShare[], and the form system actions, but no source files or tests. Start by tracing how NOCANCEL reaches a form and how save updates its flags; then add checks that only Cancel is hidden and that the behavior persists after Save.

Written by the indexing model from the issue text.

Description

bug
Description

The NOCANCEL option of the SHOW and DIALOG operators hides the Cancel system action of the opened form. It also removes the Share system action (System.formShare[], the button with the share icon at the bottom left of the form in the web client) — on every form, including one that is not the session owner, where no Cancel action is shown anyway: NOMANAGESESSION NOCANCEL changes nothing but the disappearance of Share. The Customize action next to it stays.

Reproducer (a module in the navigator of any application):

MODULE NoCancelShare;

REQUIRE System;

NAMESPACE NoCancelShare;

CLASS Item 'Item';
name 'Name' = DATA STRING[50] (Item);

FORM items 'Items'
    OBJECTS i = Item
    PROPERTIES(i) name, NEW, DELETE
;

showDefault 'Show' () { SHOW items MANAGESESSION; }
showNoCancel 'Show NOCANCEL' () { SHOW items MANAGESESSION NOCANCEL; }
showNoOwnerNoCancel 'Show NOMANAGESESSION NOCANCEL' () { SHOW items NOMANAGESESSION NOCANCEL; }

NAVIGATOR {
    NEW FOLDER noCancelShare 'NOCANCEL probe' WINDOW toolbar {
        NEW showDefault;
        NEW showNoCancel;
        NEW showNoOwnerNoCancel;
    }
}

Open the form through each of the three navigator elements and compare the system buttons at the bottom of the form:

Opened by Expected Actual
showDefault Share, Customize, Refresh, Save, Cancel, OK, Close as expected
showNoCancel the same without Cancel Share is missing as well
showNoOwnerNoCancel Share, Customize, Refresh, OK, Close (a form that is not the session owner shows no Save and no Cancel) Share is missing

CANCEL instead of NOCANCEL keeps Share; DIALOG items MANAGESESSION NOCANCEL DO {} behaves like showNoCancel.

The option also does not outlive the first Save: on a card opened with SHOW item OBJECTS i = ... MANAGESESSION NOCANCEL (an editable form of one object), change a value and press Save — after the save the form shows Cancel and Share, as if no NOCANCEL had been given.

Checked on master 54dc3afde5 (2026-11-03) in the web client; the v6 branch carries the same code.

Fix

Pass the option to the form as a flag of its own, kept for the lifetime of the form, and hide only the Cancel action by it, so that Share keeps reacting to the "form opened for a newly created object" flag alone — CANCEL / NOCANCEL then still override the default for Cancel exactly as now, and a save on the form no longer cancels the option. Add a check that NOCANCEL leaves every other system action in place and still holds after a save.

Reason

The option does not reach the form as a separate flag: the form has one logical flag that marks a form opened for a newly created object (where cancelling the changes would discard the object itself, so the platform hides Cancel there on its own), and NOCANCEL / CANCEL only force that flag on or off. Cancel is hidden when the flag is set — and so is Share, whose display condition is bound to the same flag (a link to an unsaved object makes no sense). Customize is not affected because its visibility is governed by a condition of its own. The flag is cleared once the form's changes are saved (the object is not new any more), which also ends the effect of an explicit NOCANCEL.

Dominant language
Java
Stars
214
Forks
46
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lsfusion/platform

All issues in lsfusion/platform

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.