There are 2 remaining cases where sectionNumbers and issuesSeverity are of different length for pageLoaded and editClicked events.
= Two issues inside the lead (no multiple issues)
== Examples
https://reading-web-staging.wmflabs.org/w/index.php?title=Four_Horsemen_(drink)
https://en.wikipedia.org/wiki/Endurance_Kart_Championship
== Visual
{F25471845}
== Current behaviour
```
sectionNumbers: [0] issuesSeverity: [HIGH, HIGH]
```
== Expected behavior
we should log
```
sectionNumbers: [0, 0] issuesSeverity: [HIGH, HIGH]
```
= Multiple issues template
== Examples
Can be found here: https://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Template%3AMultiple+issues&namespace=0
e.g.
https://reading-web-staging.wmflabs.org/w/index.php?title=Politics_of_Cyprus
== Visual
{F25472121}
== Current behaviour
```
{ sectionNumbers: [0], issuesSeverity: [MEDIUM, MEDIUM] }
```
== Expected behavior
we should log
```
{ sectionNumbers: [0], issuesSeverity: [MEDIUM] }
```
where MEDIUM is the maximum severity level.
= combining both above
==Example
https://reading-web-staging.wmflabs.org/w/index.php?title=Altitude_latitude_theory
== Visual
{F25472130}
== Current behaviour
```
{ sectionNumbers: [0], issuesSeverity: ["HIGH", "MEDIUM", "LOW", "MEDIUM"] }
```
== Expected behavior
we should log
```
{ sectionNumbers: [0], issuesSeverity: [HIGH, MEDIUM] }
```
where MEDIUM is the maximum severity level of the multiple issues template and HIGH relates to the other box
= Acceptance criteria
[] Behaviour is consistent between group A and group B
[] Clicking edit should log sectionNumbers and issuesSeverity per definition above
[] pageLoaded event should log sectionNumbers and issuesSeverity per definition above
= Developer notes
getAllIssuesSections is the problematic function
```
/**
* Returns an array of all the page sections that have issues.
* @return {array}
*/
function getAllIssuesSections() {
return Object.keys( allIssues ).filter( function ( section ) {
return allIssues[ section ].length;
} );
}
```
This will need to be modified. If allIssues[section] is length 2, we should return 2 section ids.
However, allIssues is also used to track all issues collapsed/not-collapsed.
We'll probably have to update the IssueSummary typedef to include a hidden field which will be set for issues hidden under multiple issues tag.
This is not going to be a trivial change.