Creating a new institution with minimal info fails to save

Bug #1828141 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
18.04
Fix Released
High
Unassigned
18.10
Fix Released
High
Unassigned
19.04
Fix Released
High
Unassigned
19.10
Fix Released
High
Unassigned

Bug Description

When we do something like:

    $name = 'My new institution';
    $institution = institution_generate_name($name);
    $newinstitution = new Institution();
    $newinstitution->initialise($institution, $name);
    $newinstitution->commit();

It should create us a new institution - but instead we get an sql error complaining that the 'tags' column is not an integer

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/9978

Revision history for this message
Steven (stevens-q) wrote :

TITLE: Creating a new institution with minimal info fails to save

BUG SUMMARY: This bug has something to do with a larger piece of functionality (SAML login) This code basically creates an Institution when a user browses to the home page - multiple browses to home page = multiple Institution created with an alpha character amended to the short name.

When we do something like:

    $name = 'My new institution';
    $institution = institution_generate_name($name);
    $newinstitution = new Institution();
    $newinstitution->initialise($institution, $name);
    $newinstitution->commit();

It should create us a new institution - but instead we get an sql error complaining that the 'tags' column is not an integer
==============================================

Commit hash:
Environment tested: Master
Browser tested: Chrome
Theme used: Raw | Default raw | Ocean | Modern | Primary school

PRECONDITIONS:
------------------------
1) Add the following code to the index.php file found in the htdocs folder.
     a) Add the code just above the if user is logged in function (line 29)
     b) code to add is
    $name = 'My new institution';
    $institution = institution_generate_name($name);
    $newinstitution = new Institution();
    $newinstitution->initialise($institution, $name);
    $newinstitution->commit();
2) Site admin user is Logged in to site

TEST STEPS:
------------------------
1) Browse to the home page
2) Refresh the home page
3) Browse to Admin menu > Institutions > Settings
4) Verify that an Institution named "My new institution" and a short name of "mynewinstitution" has been created ✔
5) Verify that an Institution named "My new institution" and a short name of "mynewinstitutiona" has been created ✔

Catalyst QA ✔

NOTE: Remove the code from the index.php file - you don't want a million Institutions to be created

Changed in mahara:
status: New → In Progress
importance: Undecided → High
milestone: none → 19.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9978
Committed: https://git.mahara.org/mahara/mahara/commit/e3171960e78e701446eaf15a6dc548e5ebb5c8f0
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit e3171960e78e701446eaf15a6dc548e5ebb5c8f0
Author: Robert Lyon <email address hidden>
Date: Wed May 8 14:15:32 2019 +1200

Bug 1828141: Create a new institution correctly

Need the default settings be interger rather than true/false

behatnotneeded

Change-Id: I65a032e3a5b1cf363b6f0ebcc6c7f5a3b30c2f34
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/9998

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9998
Committed: https://git.mahara.org/mahara/mahara/commit/883bb2cbc9790eaf2ab2c54b8687685c555f64ca
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 19.04_STABLE

commit 883bb2cbc9790eaf2ab2c54b8687685c555f64ca
Author: Robert Lyon <email address hidden>
Date: Wed May 8 14:15:32 2019 +1200

Bug 1828141: Create a new institution correctly

Need the default settings be interger rather than true/false

behatnotneeded

Change-Id: I65a032e3a5b1cf363b6f0ebcc6c7f5a3b30c2f34
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit e3171960e78e701446eaf15a6dc548e5ebb5c8f0)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "18.10_STABLE" branch: https://reviews.mahara.org/9999

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9999
Committed: https://git.mahara.org/mahara/mahara/commit/366c905b20ea7f41957178f46cc70070925033d0
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 18.10_STABLE

commit 366c905b20ea7f41957178f46cc70070925033d0
Author: Robert Lyon <email address hidden>
Date: Wed May 8 14:15:32 2019 +1200

Bug 1828141: Create a new institution correctly

Need the default settings be interger rather than true/false

behatnotneeded

Change-Id: I65a032e3a5b1cf363b6f0ebcc6c7f5a3b30c2f34
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit e3171960e78e701446eaf15a6dc548e5ebb5c8f0)
(cherry picked from commit 883bb2cbc9790eaf2ab2c54b8687685c555f64ca)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "18.04_STABLE" branch: https://reviews.mahara.org/10000

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10000
Committed: https://git.mahara.org/mahara/mahara/commit/3aee5e6277c5b112dd0d39000c7260ccd9f906e5
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 18.04_STABLE

commit 3aee5e6277c5b112dd0d39000c7260ccd9f906e5
Author: Robert Lyon <email address hidden>
Date: Wed May 8 14:15:32 2019 +1200

Bug 1828141: Create a new institution correctly

Need the default settings be interger rather than true/false

behatnotneeded

Change-Id: I65a032e3a5b1cf363b6f0ebcc6c7f5a3b30c2f34
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit e3171960e78e701446eaf15a6dc548e5ebb5c8f0)
(cherry picked from commit 883bb2cbc9790eaf2ab2c54b8687685c555f64ca)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10065

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.