Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/89 use inventory snapshot for dashboard widgets #142

Merged
2 changes: 1 addition & 1 deletion application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app.grails.version=1.3.9
app.name=openboxes
app.revisionNumber=11160
app.servlet.version=2.4
app.version=0.7.8
app.version=0.7.9
plugins.barcode4j=0.2.1
plugins.bubbling=2.1.4
plugins.clickstream=0.2.0
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http:https://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://www.liquibase.org/xml/ns/dbchangelog/1.9 http:https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">

<changeSet author="jmiranda" id="1462561958531-disable-foreign-key-checks" runAlways="true" dbms="mysql">
<sql>SET FOREIGN_KEY_CHECKS=0</sql>
</changeSet>

<changeSet author="jmiranda (generated)" id="1462561958531-1">
<addNotNullConstraint columnDataType="CHAR(38)" columnName="id" defaultNullValue="" tableName="product_group"/>
</changeSet>

<changeSet author="jmiranda (generated)" id="1462561958531-2">
<addNotNullConstraint columnDataType="CHAR(38)" columnName="id" defaultNullValue="" tableName="product_package"/>
</changeSet>

<changeSet author="jmiranda (generated)" id="1462561958531-3">
<addNotNullConstraint columnDataType="CHAR(38)" columnName="id" defaultNullValue="" tableName="unit_of_measure_class"/>
</changeSet>

<changeSet author="jmiranda (generated)" id="1462561958531-4">
<preConditions onFail="MARK_RAN">
<not><primaryKeyExists tableName="product_group" primaryKeyName="PRIMARY"/></not>
</preConditions>
<addPrimaryKey columnNames="id" tableName="product_group"/>
</changeSet>

<changeSet author="jmiranda (generated)" id="1462561958531-5">
<preConditions onFail="MARK_RAN">
<not><primaryKeyExists tableName="product_package" primaryKeyName="PRIMARY"/></not>
</preConditions>
<addPrimaryKey columnNames="id" tableName="product_package"/>
</changeSet>

<changeSet author="jmiranda (generated)" id="1462561958531-6">
<preConditions onFail="MARK_RAN">
<not><primaryKeyExists tableName="unit_of_measure_class" primaryKeyName="PRIMARY"/></not>
</preConditions>
<addPrimaryKey columnNames="id" tableName="unit_of_measure_class"/>
</changeSet>

<changeSet author="jmiranda" id="1462561958531-enable-foreign-key-checks" runAlways="true" dbms="mysql">
<sql>SET FOREIGN_KEY_CHECKS=1</sql>
</changeSet>



</databaseChangeLog>
9 changes: 9 additions & 0 deletions grails-app/migrations/0.7.x/changelog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http:https://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:https://www.liquibase.org/xml/ns/dbchangelog/1.9 http:https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">

<include file="0.7.x/changelog-2016-05-04-2329-add-missing-primary-keys.xml"/>
<include file="0.7.x/changelog-2016-05-04-2329-add-missing-foreign-key-constraints.xml"/>

</databaseChangeLog>
1 change: 1 addition & 0 deletions grails-app/migrations/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@

<include file="0.5.x/changelog.xml"/>
<include file="0.6.x/changelog.xml"/>
<include file="0.7.x/changelog.xml"/>

</databaseChangeLog>
4 changes: 2 additions & 2 deletions grails-app/views/product/_summary.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
</g:else>
</g:if>
<g:elseif test="${inventoryLevelInstance?.status == InventoryStatus.NOT_SUPPORTED}">
<warehouse:message code="enum.InventoryStatus.NOT_SUPPORTED"/>safsafsa
<warehouse:message code="enum.InventoryStatus.NOT_SUPPORTED"/>
</g:elseif>
<g:elseif test="${inventoryLevelInstance?.status == InventoryStatus.SUPPORTED_NON_INVENTORY}">
<warehouse:message code="enum.InventoryStatus.SUPPORTED_NON_INVENTORY"/>fsafsa
<warehouse:message code="enum.InventoryStatus.SUPPORTED_NON_INVENTORY"/>
</g:elseif>
<g:else>
none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.pih.warehouse.reporting

import grails.converters.JSON
import grails.test.ControllerUnitTestCase
import org.junit.Ignore
import org.junit.Test
import org.pih.warehouse.core.Location
import org.pih.warehouse.inventory.*
Expand All @@ -24,7 +25,7 @@ class ReportControllerTests extends ControllerUnitTestCase {
assert controller.response.contentAsString.split("\n").size() == 5
}

@Test
@Ignore // Removed validation logic since it seemed pointless
void showInventorySamplingReport_shouldHandleErrorCase() {
def location = Location.findByName("Boston Headquarters");
assert location != null
Expand Down