[MGNLUI-3945] Jump to next error doesn't work with tab has 1 field Created: 12/Jul/16 Updated: 20/Apr/17 Resolved: 20/Apr/17 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | 5.4.7 |
| Fix Version/s: | 5.5.4 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Oanh Thai Hoang | Assignee: | Ngoc Nguyenthanh |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.5h | ||
| Original Estimate: | 0.5h | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Sprint: | Saigon 91, Saigon 92 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
Step to reproduce:
Output: Can see the correct error number but clicking to "Jump to next error" doesn't jump any where clicking-to-jump-to-next-error-but-nothing-happens.png Problem: comes from FormSection.getNextProblematicField(Connector) function
public Component getNextProblematicField(Connector currentFocused) {
int startIndex = components.indexOf(currentFocused) + 1;
if (startIndex < components.size() - 1) {
while (startIndex < components.size()) {
Component c = components.get(startIndex++);
if (c instanceof AbstractField && !((AbstractField<?>) c).isValid()) {
return c;
}
}
}
return null;
}
The if condition if (startIndex < components.size() - 1) is incorrect for the case: tab has only one field. startIndex is 0 and (components.size() - 1) is 0 also. So can't find the invalid component as expected |
| Comments |
| Comment by Oanh Thai Hoang [ 20/Apr/17 ] |
|
Has been fixed by https://jira.magnolia-cms.com/browse/MGNLUI-3640 |