Added alert status field. Deprecated old isfixed column.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Fri, 25 Mar 2011 10:32:36 +0100
changeset 11364 b26053672b18
parent 11363 b96d9a39520e
child 11365 712dcd227b20
Added alert status field. Deprecated old isfixed column.

Alert background process has been updated and a modulescript is provided to
initialize properly the new column.
src-db/database/model/tables/AD_ALERT.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeAlertStatus.class
src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeAlertStatusData.class
src-util/modulescript/src/org/openbravo/modulescript/InitializeAlertStatus.java
src-util/modulescript/src/org/openbravo/modulescript/InitializeAlertStatus_data.xsql
src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql
--- a/src-db/database/model/tables/AD_ALERT.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/model/tables/AD_ALERT.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -69,6 +69,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="STATUS" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_ALERTRULE" name="AD_ALERT_AD_ALERTRULE">
         <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/>
       </foreign-key>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -249193,7 +249193,7 @@
 <!--803836-->  <AD_COLUMN_ID><![CDATA[803836]]></AD_COLUMN_ID>
 <!--803836-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--803836-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--803836-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--803836-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--803836-->  <NAME><![CDATA[Fixed]]></NAME>
 <!--803836-->  <DESCRIPTION><![CDATA[A means of locking the header tab so it will not be affected if a specified process is run again.]]></DESCRIPTION>
 <!--803836-->  <HELP><![CDATA[Is fixed]]></HELP>
@@ -249215,7 +249215,7 @@
 <!--803836-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--803836-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--803836-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
-<!--803836-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--803836-->  <DEVELOPMENTSTATUS><![CDATA[DP]]></DEVELOPMENTSTATUS>
 <!--803836-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--803836-->  <POSITION><![CDATA[13]]></POSITION>
 <!--803836-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
@@ -312293,6 +312293,44 @@
 <!--9E96300C46ED4928E040007F01006BD5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--9E96300C46ED4928E040007F01006BD5--></AD_COLUMN>
 
+<!--9EBFD106879C843FE040007F01001B0A--><AD_COLUMN>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_COLUMN_ID><![CDATA[9EBFD106879C843FE040007F01001B0A]]></AD_COLUMN_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9EBFD106879C843FE040007F01001B0A-->  <NAME><![CDATA[Alert Status]]></NAME>
+<!--9EBFD106879C843FE040007F01001B0A-->  <HELP><![CDATA[Status of the alert:
+New: The alert has been created and has not been reviewed yet.
+Read: The alert has been reviewed and user is waiting to be solved.
+Solved: The alert has been solved and is not an issue any more.
+Exception: The alert has been acknowledged but not action is going to be made to solve it.]]></HELP>
+<!--9EBFD106879C843FE040007F01001B0A-->  <COLUMNNAME><![CDATA[Status]]></COLUMNNAME>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_TABLE_ID><![CDATA[594]]></AD_TABLE_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_REFERENCE_VALUE_ID><![CDATA[FF8080812EC85BDE012EC8B2DB30001E]]></AD_REFERENCE_VALUE_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--9EBFD106879C843FE040007F01001B0A-->  <DEFAULTVALUE><![CDATA[NEW]]></DEFAULTVALUE>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
+<!--9EBFD106879C843FE040007F01001B0A-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_ELEMENT_ID><![CDATA[FF8080812EC85BDE012EC8B056D20017]]></AD_ELEMENT_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--9EBFD106879C843FE040007F01001B0A-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--9EBFD106879C843FE040007F01001B0A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9EBFD106879C843FE040007F01001B0A-->  <POSITION><![CDATA[18]]></POSITION>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--9EBFD106879C843FE040007F01001B0A-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--9EBFD106879C843FE040007F01001B0A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--9EBFD106879C843FE040007F01001B0A--></AD_COLUMN>
+
 <!--9EFBEC5F6F6EDD01E040007F01011DA0--><AD_COLUMN>
 <!--9EFBEC5F6F6EDD01E040007F01011DA0-->  <AD_COLUMN_ID><![CDATA[9EFBEC5F6F6EDD01E040007F01011DA0]]></AD_COLUMN_ID>
 <!--9EFBEC5F6F6EDD01E040007F01011DA0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -28375,4 +28375,20 @@
 <!--FB0D51F86B9A4D8E9976BC1A224075A2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--FB0D51F86B9A4D8E9976BC1A224075A2--></AD_ELEMENT>
 
+<!--FF8080812EC85BDE012EC8B056D20017--><AD_ELEMENT>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <AD_ELEMENT_ID><![CDATA[FF8080812EC85BDE012EC8B056D20017]]></AD_ELEMENT_ID>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <COLUMNNAME><![CDATA[Status]]></COLUMNNAME>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <NAME><![CDATA[Alert Status]]></NAME>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <PRINTNAME><![CDATA[Alert Status]]></PRINTNAME>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <HELP><![CDATA[Status of the alert:
+New: The alert has been created and has not been reviewed yet.
+Read: The alert has been reviewed and user is waiting to be solved.
+Solved: The alert has been solved and is not an issue any more.
+Exception: The alert has been acknowledged but not action is going to be made to solve it.]]></HELP>
+<!--FF8080812EC85BDE012EC8B056D20017-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EC85BDE012EC8B056D20017--></AD_ELEMENT>
+
 </data>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -185529,21 +185529,21 @@
 <!--804192-->  <AD_FIELD_ID><![CDATA[804192]]></AD_FIELD_ID>
 <!--804192-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--804192-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--804192-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--804192-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--804192-->  <NAME><![CDATA[Fixed]]></NAME>
 <!--804192-->  <DESCRIPTION><![CDATA[Is fixed]]></DESCRIPTION>
 <!--804192-->  <HELP><![CDATA[When is fixed is set as 'Y' means that the rule that the record which raised the alert has been modified and the rule is not raised for this record anymore.]]></HELP>
 <!--804192-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
 <!--804192-->  <AD_TAB_ID><![CDATA[800268]]></AD_TAB_ID>
 <!--804192-->  <AD_COLUMN_ID><![CDATA[803836]]></AD_COLUMN_ID>
-<!--804192-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--804192-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--804192-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--804192-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--804192-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--804192-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--804192-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--804192-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--804192-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--804192-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
 <!--804192-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--804192-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--804192-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
@@ -221189,6 +221189,34 @@
 <!--9EB0289791634210B266BA459E47AC31-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--9EB0289791634210B266BA459E47AC31--></AD_FIELD>
 
+<!--9EBFD10687A0843FE040007F01001B0A--><AD_FIELD>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <AD_FIELD_ID><![CDATA[9EBFD10687A0843FE040007F01001B0A]]></AD_FIELD_ID>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <NAME><![CDATA[Alert Status]]></NAME>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <HELP><![CDATA[Status of the alert:
+New: The alert has been created and has not been reviewed yet.
+Read: The alert has been reviewed and user is waiting to be solved.
+Solved: The alert has been solved and is not an issue any more.
+Exception: The alert has been acknowledged but not action is going to be made to solve it.]]></HELP>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <AD_TAB_ID><![CDATA[800268]]></AD_TAB_ID>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <AD_COLUMN_ID><![CDATA[9EBFD106879C843FE040007F01001B0A]]></AD_COLUMN_ID>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--9EBFD10687A0843FE040007F01001B0A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--9EBFD10687A0843FE040007F01001B0A--></AD_FIELD>
+
 <!--9EC91606F52948D2BB833DA494E65BBD--><AD_FIELD>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <AD_FIELD_ID><![CDATA[9EC91606F52948D2BB833DA494E65BBD]]></AD_FIELD_ID>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MENU.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_MENU.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -4617,7 +4617,7 @@
 <!--800230-->  <AD_MENU_ID><![CDATA[800230]]></AD_MENU_ID>
 <!--800230-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--800230-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--800230-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--800230-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--800230-->  <NAME><![CDATA[Alert Management]]></NAME>
 <!--800230-->  <DESCRIPTION><![CDATA[Edit predefined alerts made by the user.]]></DESCRIPTION>
 <!--800230-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -34358,6 +34358,50 @@
 <!--FF8080812EA11CED012EA1CCB28700F0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--FF8080812EA11CED012EA1CCB28700F0--></AD_MESSAGE>
 
+<!--FF8080812EDE8228012EE38321540030--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38321540030-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38321540030]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38321540030-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38321540030-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38321540030-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38321540030-->  <VALUE><![CDATA[AlertStatus_New]]></VALUE>
+<!--FF8080812EDE8228012EE38321540030-->  <MSGTEXT><![CDATA[New]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38321540030-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38321540030-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38321540030--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE384968A0035--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE384968A0035-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE384968A0035]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE384968A0035-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE384968A0035-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE384968A0035-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE384968A0035-->  <VALUE><![CDATA[AlertStatus_Acknowledged]]></VALUE>
+<!--FF8080812EDE8228012EE384968A0035-->  <MSGTEXT><![CDATA[Acknowledged]]></MSGTEXT>
+<!--FF8080812EDE8228012EE384968A0035-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE384968A0035-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE384968A0035--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE3854B280039--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE3854B280039-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE3854B280039]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE3854B280039-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE3854B280039-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE3854B280039-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE3854B280039-->  <VALUE><![CDATA[AlertStatus_Suppressed]]></VALUE>
+<!--FF8080812EDE8228012EE3854B280039-->  <MSGTEXT><![CDATA[Suppressed]]></MSGTEXT>
+<!--FF8080812EDE8228012EE3854B280039-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE3854B280039-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE3854B280039--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE3857935003C--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE3857935003C-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE3857935003C]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE3857935003C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE3857935003C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE3857935003C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE3857935003C-->  <VALUE><![CDATA[AlertStatus_Solved]]></VALUE>
+<!--FF8080812EDE8228012EE3857935003C-->  <MSGTEXT><![CDATA[Solved]]></MSGTEXT>
+<!--FF8080812EDE8228012EE3857935003C-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE3857935003C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE3857935003C--></AD_MESSAGE>
+
 <!--FF8081812EDCCB27012EDCD3F897000A--><AD_MESSAGE>
 <!--FF8081812EDCCB27012EDCD3F897000A-->  <AD_MESSAGE_ID><![CDATA[FF8081812EDCCB27012EDCD3F897000A]]></AD_MESSAGE_ID>
 <!--FF8081812EDCCB27012EDCD3F897000A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -5243,4 +5243,17 @@
 <!--FC98D43996374909B1AAC0197BBE95BA-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--FC98D43996374909B1AAC0197BBE95BA--></AD_REFERENCE>
 
+<!--FF8080812EC85BDE012EC8B2DB30001E--><AD_REFERENCE>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <AD_REFERENCE_ID><![CDATA[FF8080812EC85BDE012EC8B2DB30001E]]></AD_REFERENCE_ID>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <NAME><![CDATA[Alert status]]></NAME>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <HELP><![CDATA[Possible statuses of alerts]]></HELP>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--FF8080812EC85BDE012EC8B2DB30001E-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--FF8080812EC85BDE012EC8B2DB30001E--></AD_REFERENCE>
+
 </data>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Fri Mar 25 09:38:37 2011 +0100
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Fri Mar 25 10:32:36 2011 +0100
@@ -10748,6 +10748,54 @@
 <!--FF8080812E0B9ECA012E0BAC65A30050-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--FF8080812E0B9ECA012E0BAC65A30050--></AD_REF_LIST>
 
+<!--FF8080812EC85BDE012EC8B32FD90022--><AD_REF_LIST>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <AD_REF_LIST_ID><![CDATA[FF8080812EC85BDE012EC8B32FD90022]]></AD_REF_LIST_ID>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <VALUE><![CDATA[NEW]]></VALUE>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <NAME><![CDATA[New]]></NAME>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <AD_REFERENCE_ID><![CDATA[FF8080812EC85BDE012EC8B2DB30001E]]></AD_REFERENCE_ID>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EC85BDE012EC8B32FD90022-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--FF8080812EC85BDE012EC8B32FD90022--></AD_REF_LIST>
+
+<!--FF8080812EC85BDE012EC8B445AF0028--><AD_REF_LIST>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <AD_REF_LIST_ID><![CDATA[FF8080812EC85BDE012EC8B445AF0028]]></AD_REF_LIST_ID>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <VALUE><![CDATA[SUPPRESSED]]></VALUE>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <NAME><![CDATA[Suppressed]]></NAME>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <AD_REFERENCE_ID><![CDATA[FF8080812EC85BDE012EC8B2DB30001E]]></AD_REFERENCE_ID>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EC85BDE012EC8B445AF0028-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--FF8080812EC85BDE012EC8B445AF0028--></AD_REF_LIST>
+
+<!--FF8080812EC85BDE012EC8B65856003D--><AD_REF_LIST>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <AD_REF_LIST_ID><![CDATA[FF8080812EC85BDE012EC8B65856003D]]></AD_REF_LIST_ID>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <VALUE><![CDATA[ACKNOWLEDGED]]></VALUE>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <NAME><![CDATA[Acknowledged]]></NAME>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <AD_REFERENCE_ID><![CDATA[FF8080812EC85BDE012EC8B2DB30001E]]></AD_REFERENCE_ID>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EC85BDE012EC8B65856003D-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--FF8080812EC85BDE012EC8B65856003D--></AD_REF_LIST>
+
+<!--FF8080812EC85BDE012EC8B67BEE0041--><AD_REF_LIST>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <AD_REF_LIST_ID><![CDATA[FF8080812EC85BDE012EC8B67BEE0041]]></AD_REF_LIST_ID>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <VALUE><![CDATA[SOLVED]]></VALUE>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <NAME><![CDATA[Solved]]></NAME>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <AD_REFERENCE_ID><![CDATA[FF8080812EC85BDE012EC8B2DB30001E]]></AD_REFERENCE_ID>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812EC85BDE012EC8B67BEE0041-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--FF8080812EC85BDE012EC8B67BEE0041--></AD_REF_LIST>
+
 <!--FF8081812E0A7E62012E0A8326F7000C--><AD_REF_LIST>
 <!--FF8081812E0A7E62012E0A8326F7000C-->  <AD_REF_LIST_ID><![CDATA[FF8081812E0A7E62012E0A8326F7000C]]></AD_REF_LIST_ID>
 <!--FF8081812E0A7E62012E0A8326F7000C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeAlertStatus.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeAlertStatusData.class has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/src/org/openbravo/modulescript/InitializeAlertStatus.java	Fri Mar 25 10:32:36 2011 +0100
@@ -0,0 +1,40 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.modulescript;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.database.ConnectionProvider;
+
+public class InitializeAlertStatus extends ModuleScript{
+@Override
+//Updates new column values with deprecated ones
+  public void execute() {
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      if (InitializeAlertStatusData.hasAlertsToUpdate(cp.getConnection(), cp)) {
+        InitializeAlertStatusData.initializeAlertStatus(cp.getConnection(), cp);
+      }
+    } catch (Exception e) {
+      handleError(e);
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/src/org/openbravo/modulescript/InitializeAlertStatus_data.xsql	Fri Mar 25 10:32:36 2011 +0100
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<SqlClass name="InitializeAlertStatusData" package="org.openbravo.modulescript">
+  <SqlClassComment></SqlClassComment>
+  <SqlMethod name="select" type="preparedStatement" connection="true" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        select '' as name
+        from dual
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="hasAlertsToUpdate" type="preparedStatement" connection="true" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        select count(*) as name from dual
+        where exists (select 1 from ad_alert where status is null)
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="initializeAlertStatus" type="preparedStatement" connection="true" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        update ad_alert
+        set status = case isactive
+                       when 'N' then 'SOLVED'
+                       else
+                         case isfixed
+                           when 'Y' then 'ACKNOWLEDGED'
+                           else 'NEW'
+                       end
+                     end,
+            isactive = 'Y'
+        where status is null
+      ]]>
+    </Sql>
+  </SqlMethod>
+</SqlClass>
--- a/src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql	Fri Mar 25 09:38:37 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql	Fri Mar 25 10:32:36 2011 +0100
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2007 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -67,7 +67,7 @@
             FROM AD_ALERT
            WHERE AD_ALERTRULE_ID = ?
              AND REFERENCEKEY_ID = ?
-             AND ISACTIVE = 'Y'
+             AND STATUS != 'SOLVED'
       ]]></Sql>
       <Parameter name="alertRule"/>
       <Parameter name="ref"/>      
@@ -97,17 +97,19 @@
       <SqlMethodComment></SqlMethodComment>
       <Sql><![CDATA[
         INSERT INTO AD_ALERT
-        (AD_ALERT_ID, AD_CLIENT_ID, AD_ORG_ID,                                                                                                                                                                                    
+        (AD_ALERT_ID, AD_CLIENT_ID, AD_ORG_ID,
          ISACTIVE, CREATED, CREATEDBY, 
          UPDATED, UPDATEDBY, 
          AD_ALERTRULE_ID, RECORD_ID, REFERENCEKEY_ID, 
-         DESCRIPTION, AD_USER_ID, AD_ROLE_ID)
+         DESCRIPTION, AD_USER_ID, AD_ROLE_ID,
+         STATUS)
         VALUES
          (?,?,?,
           'Y',TO_DATE(?),?,
           now(),0,
           ?,?,?,
-          ?,?,?)
+          ?,?,?,
+          'NEW')
     ]]></Sql>
     <Parameter name="alertId"/>
     <Parameter name="clientId"/>
@@ -129,11 +131,11 @@
       <SqlMethodComment></SqlMethodComment>
       <Sql><![CDATA[
         UPDATE AD_ALERT
-           SET ISACTIVE  = 'N',
+           SET STATUS    = 'SOLVED',
                UPDATED   = NOW(),
-               UPDATEDBY = 0 
+               UPDATEDBY = 0
          WHERE AD_ALERTRULE_ID = ?
-           AND ISACTIVE = 'Y'
+           AND STATUS != 'SOLVED'
            AND NOT EXISTS 
                    (SELECT 1 FROM (SELECT '' AS AD_REFERENCEKEY_ID FROM DUAL) A WHERE 1=1
                               AND A.REFERENCEKEY_ID = AD_ALERT.REFERENCEKEY_ID)