Reviewed:  https://reviews.mahara.org/11066
Committed: 
https://git.mahara.org/mahara/mahara/commit/7d8f013b1fb78d56009602c317d526562d27a714
Submitter: Robert Lyon ([email protected])
Branch:    master

commit 7d8f013b1fb78d56009602c317d526562d27a714
Author: Cecilia Vela Gurovic <[email protected]>
Date:   Thu Jul 9 18:09:01 2020 +1200

Bug 1886883: SE editor - add an empty element form

when the parent standard of the last element is deleted

Test1
- create a SE framework
- have more than one standard, only one of them has standard elements
- delete that standard element
- the form will show an error 'Value must have at least 1 items'
- click on Save
expected result: the form will not save and show an error
actual result: the form will save and the framework won't have any standard 
elements on the DB, showing a success message at the top 'Your framework has 
been submitted'

Test2
- the previous test leaves the framework in a state with no standard elements, 
and after loading and saving many times, I can see the default empty element is 
displayed in the form but it's never saved to DB. It only gets saved when 
editing the name or changing any field

behatnotneeded

Change-Id: I08b7bb01aa9866a92c267bd30be8f70cd4b6676b

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1886883

Title:
  SmartEvidence framework editor saving to DB errors

Status in Mahara:
  Fix Committed

Bug description:
  There a some errors when editing and saving a SE framework with the
  Editor tool.

  There's still a few errors after changing the standards and standard
  elements. Specially when moving to left/right and deleting. It looks
  like some of the other fields are not being updated as they're
  creating the following issues:

  Test1
  - create a SE framework
  - have more than one standard, only one of them has standard elements
  - delete that standard element
  - the form will show an error 'Value must have at least 1 items'
  - click on Save
  expected result: the form will not save and show an error
  actual result: the form will save and the framework won't have any standard 
elements on the DB, showing a success message at the top 'Your framework has 
been submitted'

  Test2
  - the previous test leaves the framework in a state with no standard 
elements, and after loading and saving many times, I can see the default empty 
element is displayed in the form but it's never saved to DB. It only gets saved 
when editing the name or changing any field

  Test3
  - create a new framework
  - name first standard Standard1
  - name the element Element1.1
  - add a standard and name it Standard2
  - add an element Element2.1 child of Standard2
  - save
  - delete Standard1
  - add new standard Standard3
  - save
  - check DB with following script

  select s.id, s.shortname,
  e.id, e.shortname, e.parent from
  framework_standard s left join 
  framework_standard_element e
  on e.standard=s.id
  where s.framework=<frameworkid>;

  expected result: 
  there's only 2 standards (Standard2, Standard3) and 1 element (Element2.1) 
child of Standard2
  actual result: 
  Element2.1 is duplicated as child of Standard3
  Element2.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1886883/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to