iTop
iTop copied to clipboard
Activity panel: Fix compose button opening log picker menu when only 1 log available
Symptom
When on an object with only 1 log in the activity panel, if you click on the "Compose" button when being on the "Activity" tab, the log picker is displayed with only one item, forcing us to an avoidable extra click.

Proposition
When on an object with only 1 log in the activity panel, open the log directly when "Compose" button is pressed.
Arguments in favor
- Better UX as it reduces the number of clicks to get to the log form
Reproduction
Use the following XML delta which adds a log on the Person class.
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0">
<classes>
<class id="Person">
<fields>
<field id="log" xsi:type="AttributeCaseLog" _delta="define">
<sql>log</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
</fields>
<presentation>
<details>
<items>
<item id="log" _delta="define">
<rank>100</rank>
</item>
</items>
</details>
</presentation>
</class>
</classes>
</itop_design>