- in IDE:
- open modules/in-bulletin/units/poll_answers/poll_answers_config.php file for editing
- add 'unique' => array('PollId'), to Answer field declaration
- save changes
- open modules/in-bulletin/units/polls/polls_config.php file for editing
- add 'unique' => array(), to Name field declaration
- save changes
- in Admin Console:
- go to Website & Content → Polls section
- create 3 polls with 2 answers in each of them (answer text must be unique within same poll)
- open 2 polls for editing
- delete any answer in any of edited polls, but remember answer text (that is unique)
- attempt to create new answer with that (remembered) text
- confirm, that record is created
- create another poll with name matching existing poll
- confirm, that validation error will be triggered
Details
Details
Diff Detail
Diff Detail
- Repository
- rINP In-Portal
- Branch
- /in-portal/branches/5.2.x
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 950 Build 950: arc lint + arc unit
Event Timeline
Comment Actions
Detected an issue (SQL error), when validation of sub-item happens to before parent item is saved into the database.
Comment Actions
Don't perform unique validation from TEMP to LIVE table, when parent record isn't yet created in TEMP table.
Comment Actions
Please test again. Also update test plan to include testing of added code fragment: http://qa.in-portal.org/D379?vs=927&id=929#toc .