Skip to content

Commit

Permalink
Fixes for support group migration procedure and other small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandmn committed May 23, 2016
1 parent f9768b0 commit 7b77552
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 597 deletions.
8 changes: 1 addition & 7 deletions build-0.base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,8 @@
<property name="dist.doc.dir" value="${dist.dir}/doc"/>
<property name="dist.libs.dir" value="${dist.dir}/libs"/>

<!-- Definition testing environment -->
<property name="tests.dir" value="${basedir}/tests"/>
<property name="tests.src" value="${tests.dir}/src"/>
<property name="tests.out" value="${build.dir}/tests"/>
<property name="tests.data" value="${tests.dir}/data"/>

<!-- Define tools variables -->
<property name="nsis.path" value="${deploy.nsis.path}"/>
<property name="nsis.path" value="${location.tool.nsis}"/>

<!-- Builds Classpath -->
<path id="classpath.bin">
Expand Down
17 changes: 2 additions & 15 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
################################################################################
# Copyright (c) 2007-2016 AREasy Runtime
#
# This library, AREasy Runtime and API for BMC Remedy AR System, is free software ("Licensed Software");
# you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either version 2.1 of the License,
# or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# including but not limited to, the implied warranty of MERCHANTABILITY, NONINFRINGEMENT,
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
################################################################################

#Build Number for ANT. Do not edit!
#Thu Feb 25 09:12:13 EET 2016
build.number=2432
#Mon May 23 16:49:53 EEST 2016
build.number=2437
2 changes: 1 addition & 1 deletion build/profile.s.damian.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ deploy.protocol = local
deploy.host.path = C:\\Program Files (x86)\\AREasy Runtime
#
# Locations for imported projects and libraries
deploy.nsis.path = C:\\Program Files (x86)\\NSIS
location.tool.nsis = C:\\Program Files (x86)\\NSIS
#################################################################
25 changes: 0 additions & 25 deletions build/profile.stefan.damian.properties

This file was deleted.

25 changes: 0 additions & 25 deletions build/profile.stefan.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
*/
public class SupportGroupRenameAction extends AbstractAction
{
private SupportGroup oldSG = null;
private SupportGroup newSG = null;

public void run() throws AREasyException
{
boolean allgroupdetails = getConfiguration().getBoolean("allgroupdetails", false);
Expand Down Expand Up @@ -70,12 +73,12 @@ public void run() throws AREasyException
String newOrganisation = getConfiguration().getString("newsgrouporganisation", getConfiguration().getString("newsupportgrouporganisation", null));
String newGroup = getConfiguration().getString("newsgroup", getConfiguration().getString("newsgroupname", getConfiguration().getString("newsupportgroup", getConfiguration().getString("newsupportgroupname", null))));

SupportGroup oldSG = new SupportGroup();
oldSG = new SupportGroup();
oldSG.setCompanyName(oldCompany);
oldSG.setOrganisationName(oldOrganisation);
oldSG.setSupportGroupName(oldGroup);

SupportGroup newSG = new SupportGroup();
newSG = new SupportGroup();
newSG.setCompanyName(newCompany);
newSG.setOrganisationName(newOrganisation);
newSG.setSupportGroupName(newGroup);
Expand All @@ -93,36 +96,60 @@ public void run() throws AREasyException
//run new support group creation procedure and to make the old one obsolete
updateSupportGroup(oldSG, newSG);

//update/create all related details
if (memberships || allgroupdetails) transferMemberships(oldSG, newSG);
if(aliases || allgroupdetails) transferGroupAliases(oldSG, newSG);
if(approvalmappings || allgroupdetails) transferApprovalMappings(oldSG, newSG);
if(favorites || allgroupdetails) transferFavorites(oldSG, newSG);
if(oncalls || allgroupdetails) transferOnCallRecords(oldSG, newSG);
if(shifts || allgroupdetails) transferShifts(oldSG, newSG);

//make old group obsolete
oldSG.setStatus("Obsolete");
oldSG.update(getServerConnection());
RuntimeLogger.info("Support group '" + oldSG.getCompanyName() + "/" + oldSG.getOrganisationName() + "/" + oldSG.getSupportGroupName() + "' has been set as Obsolete");

// update incidents and related templates
if(incidentTemplates || allrelatedtickets) updateIncidentTemplates(oldSG, newSG);
if(incidents || allrelatedtickets) updateIncidents(oldSG, newSG);

//update problems and related templates
if(problemTemplates || allrelatedtickets) updateProblemTemplates(oldSG, newSG);
if(problems || allrelatedtickets) updateProblems(oldSG, newSG);

//update know errors
if(knownerrors || allrelatedtickets) updateKnownErrors(oldSG, newSG);

//update changes and related templates
if(changeTemplates || allrelatedtickets) updateChangeTemplates(oldSG, newSG);
if(changes || allrelatedtickets) updateChanges(oldSG, newSG);

//update tasks and related templates
if(taskTemplates || allrelatedtickets) updateTaskTemplates(oldSG, newSG);
if(tasks || allrelatedtickets) updateTasks(oldSG, newSG);

//update workorders and related templates
if(workorderTemplates || allrelatedtickets) updateWorkOrderTemplates(oldSG, newSG);
if(workorders || allrelatedtickets) updateWorkOrders(oldSG, newSG);

// update CIs and related assets
if(assetrelationships || allrelatedtickets) updateAssetRelationships(oldSG, newSG);
if(cmdbrelationships || allrelatedtickets) updateCMDBRelationships(oldSG, newSG);

//update KRs
if(knowledgerecords || allrelatedtickets) updateKnowledgeRecords(oldSG, newSG);
}

protected SupportGroup getOldSupportEntity()
{
return this.oldSG;
}

protected SupportGroup getNewSupportEntity()
{
return this.newSG;
}

protected void updateSupportGroup(SupportGroup oldSG, SupportGroup newSG) throws AREasyException
{
boolean create = true;
Expand Down Expand Up @@ -160,10 +187,6 @@ protected void updateSupportGroup(SupportGroup oldSG, SupportGroup newSG) throws
newSG.update(getServerConnection());
RuntimeLogger.info("Support group '" + newSG.getCompanyName() + "/" + newSG.getOrganisationName() + "/" + newSG.getSupportGroupName() + "' has been updated and enabled");
}

oldSG.setStatus("Obsolete");
oldSG.update(getServerConnection());
RuntimeLogger.info("Support group '" + oldSG.getCompanyName() + "/" + oldSG.getOrganisationName() + "/" + oldSG.getSupportGroupName() + "' has been set as Obsolete");
}

protected void transferMemberships(SupportGroup fromGroup, SupportGroup toGroup) throws AREasyException
Expand Down
2 changes: 1 addition & 1 deletion src/nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ SectionIn 1
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\%fullname%" "UninstallString" "$INSTDIR\bin\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\%fullname%" "DisplayVersion" "%version%"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\%fullname%" "Publisher" "%vendor%"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\%fullname%" "URLInfoAbout" "http://areasy.snt.ro"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\%fullname%" "URLInfoAbout" "http://stefandmn.github.io/AREasy"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\%fullname%" "DisplayIcon" "$INSTDIR\bin\areasy.exe"

;Get estimated size
Expand Down
Binary file removed tests/data/ExportSample1.xls
Binary file not shown.
Binary file removed tests/data/ExportSample2.xls
Binary file not shown.
Binary file removed tests/data/ImportSample1.bin
Binary file not shown.
Loading

0 comments on commit 7b77552

Please sign in to comment.