Error when adding CCE item for field that cannot be updated

Description

When adding a new CCE item "Solar with battery", I am not able to save the new item. I receive an error message that "CCE Inventory Item must have voltage stabilizer field", but when I try to add that to the item, the radio buttons are unselectable.

Proposed solution
Summary: Change the logic to say that instead of making those required fields unselectable for solar, that we pre-fill with the "Not applicable" options so that the user doesn't need to manually fill them but that the requirement for having those fields filled is still met.

Acceptance Criteria

  • When selecting "Solar with battery" as equipment type, automatically select "Not Applicable" for Voltage Stabilizer, Voltage Regulator and Backup Generator in the UI for the user

    • All three fields mentioned above (Voltage Stabilizer, Voltage Regulator and Backup Generator) should not be editable by the user while equipment type is "Solar with battery"

  • When a different equipment type is selected, make those fields editable again, but the selections do not have to change

Environment

test.openlmis.org

Activity

Show:
Joanna Bebak
November 17, 2017, 8:54 AM

I checked, and everything works correctly.

Brandon Bowersox-Johnson
October 19, 2017, 8:36 PM

please summarize our decisions here into Acceptance Criteria in the ticket description so this ticket is ready to work on.

Chongsun Ahn
October 11, 2017, 1:21 AM

I prefer option #2, as it makes it easier for the user (they don't have to select these things that don't apply to them), and it only requires a change in the UI.

Rachel Powers
October 10, 2017, 9:38 PM

This is likely because we put logic in place to have certain fields be unselectable for Solar devices. Since the solar device is not powered by outlet power, it doesn't have a need for a voltage stabilizer or backup generator. However, we also made these fields required for all devices.

I think the simplest way to resolve this is to remove the logic around Solar-type devices where the voltage stabilizer and backup generator fields are made unselectable.

Alternatively, we could change the logic to say that instead of making those fields unselectable for solar, that we pre-fill the "Not applicable" options so that the user doesn't need to manually fill them but that the requirement for having those fields filled is still met.

Joanna Bebak
September 27, 2017, 1:01 PM

The issue appears to be connected only with the "Voltage Stabilizer" field. When the "Solar" type is chosen, also the "Voltage Regulator" and "Backup Generator" fields are blocked but since they aren't mentioned in the error message, I suppose there is no issue with them (especially since when other types of equipment are chosen, they are required).

Done
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Klaudia Pałkowska

Reporter

Sam Im

Labels