Print, export and draw a footer as a value of its own type
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- backend, full-stack
Research direction
Start by locating the form footer handling used by table, React, print, and XLS/XLSX rendering, then trace how a property's declared type and pattern are applied to its footer value. Check the CUSTOM 'renderFunction' path for image properties as well. Done means each view renders the footer's own value and markup, applies the column pattern only for matching types, and handles image render functions without error; update the FOOTER documentation as described.
Written by the indexing model from the issue text.
Description
Description
A property's footer (the FOOTER option of a property on a form) is a value of its own type, which may differ from the column's: a string such as 'Total' under dates, a count under amounts, a total under quantities.
The print view and the export to Excel formatted a footer by its column:
- under a column of dates, times or date-times, the footer showed the value of the column's last row, whatever the footer was;
- the column's pattern was applied to a footer of any type: a count under a column with the pattern
'000000'was printed as000002; - in XLS and XLSX, a number pattern with optional fraction digits (
'#,##0.##') was chosen for the footer by the column's last value: a total of 1.5 and 2 under a last row of 2 was shown as 4; - an HTML footer under a column of strings was printed with its tags as text.
A render function (CUSTOM 'renderFunction') of a property named image, whose values name images, took a string footer for an image too: the footer row stayed empty, and an error was shown.
CLASS Order;
date 'Date' = DATA DATE (Order);
sum 'Sum' = DATA NUMERIC[14,2] (Order) PATTERN '#,##0.##';
totalSum = GROUP SUM sum(Order o);
FORM orders 'Orders'
OBJECTS o = Order
PROPERTIES(o) date FOOTER 'Total', sum FOOTER totalSum()
;
PRINT orders showed the last order's date instead of Total under the dates, and PRINT orders XLSX could show the total rounded.
Reason
Footers in printed and exported forms showed wrong values, and a render function of an image failed on a footer.
Fix
A footer is printed, exported and given to a render function as a value of its own type: its own value, the markup of its type, and the column's pattern only where the footer is of the same kind of type as the column (a total under its column), the pattern of its own type otherwise. The documentation of the FOOTER option says where a footer is shown: in the table's footer row, in a React view, in the print view.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lsfusion/platform
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Open a form with a TSQUERY propertyPossibly taken @ichavchavadze claimed this today. Open
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
All issues in lsfusion/platform
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bug]: NetworkPolicyOperator removes finalizers added by the EKS network policy controller, which adds them backMay be free again A pull request for this issue was closed without being merged. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
strimzi/strimzi-kafka-operator#13360 · 5 comments ·
Maintainers usually reply within 1 day
-
bug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
NationalSecurityAgency/ghidra#10149 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
yegor256/antlr2ebnf-maven-plugin#155 ·
Maintainers usually reply within 1 day