Commit aefb0786 by Jay

S21293603 # Client - Incoming Issues (raised by Client) #Convert Occupation to Standard Job Title

parent 0c88d4cc
......@@ -27,6 +27,7 @@
<column name="client_id" type="Long" length="11" nullable="true"/>
<column name="hiring_team_id" type="Long" length="11" nullable="true"/>
<column name="company_user_id" type="Long" length="11" nullable="true"/>
<column name="job_title_id" type="Long" length="11" nullable="true"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_assessment_template" indexName="idx_tl_assessment_template_TemplateID" isUnique="true"><column name="template_name"/><column name="hiring_team_id"/><column name="company_user_id"/></NODE>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_ilo_job_title</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="job_title" type="String" nullable="true" length="200"/>
<column name="occupation_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
......@@ -41,6 +41,7 @@
<column name="occupation_id" type="Long" length="11" nullable="false"/>
<column name="shortened_url_id" type="Long" length="11" nullable="true"/>
<column name="template_id" type="Long" length="11" nullable="true"/>
<column name="job_title_id" type="Long" length="11" nullable="false"/>
</NODE>
<NODE name="INDEX" factory="Participant" class="oneit.sql.transfer.DefineIndexOperation" tableName="tl_job" indexName="idx_tl_job_client_id" isUnique="false"><column name="client_id"/></NODE>
......
......@@ -26,7 +26,8 @@ CREATE TABLE tl_assessment_template (
job_id numeric(12) NULL,
client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
company_user_id numeric(12) NULL,
job_title_id numeric(12) NULL
);
......
-- DROP TABLE tl_ilo_job_title;
CREATE TABLE tl_ilo_job_title (
object_id int NOT NULL ,
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
job_title varchar(200) NULL,
occupation_id numeric(12) NULL
);
ALTER TABLE tl_ilo_job_title ADD
CONSTRAINT PK_tl_ilo_job_title PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -40,7 +40,8 @@ CREATE TABLE tl_job (
hiring_team_id numeric(12) NULL,
occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL
template_id numeric(12) NULL,
job_title_id numeric(12) NOT NULL
);
......
......@@ -27,7 +27,8 @@ CREATE TABLE tl_assessment_template (
job_id number(12) NULL,
client_id number(12) NULL,
hiring_team_id number(12) NULL,
company_user_id number(12) NULL
company_user_id number(12) NULL,
job_title_id number(12) NULL
);
......
-- DROP TABLE tl_ilo_job_title;
CREATE TABLE tl_ilo_job_title (
object_id number(12) NOT NULL ,
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
job_title varchar2(200) NULL,
occupation_id number(12) NULL
);
ALTER TABLE tl_ilo_job_title ADD
CONSTRAINT PK_tl_ilo_job_title PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -41,7 +41,8 @@ CREATE TABLE tl_job (
hiring_team_id number(12) NULL,
occupation_id number(12) NOT NULL,
shortened_url_id number(12) NULL,
template_id number(12) NULL
template_id number(12) NULL,
job_title_id number(12) NOT NULL
);
......
......@@ -27,7 +27,8 @@ CREATE TABLE tl_assessment_template (
job_id numeric(12) NULL,
client_id numeric(12) NULL,
hiring_team_id numeric(12) NULL,
company_user_id numeric(12) NULL
company_user_id numeric(12) NULL,
job_title_id numeric(12) NULL
);
......
-- @AutoRun
-- drop table tl_ilo_job_title;
CREATE TABLE tl_ilo_job_title (
object_id numeric(12) NOT NULL ,
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
job_title varchar(200) NULL,
occupation_id numeric(12) NULL
);
ALTER TABLE tl_ilo_job_title ADD
CONSTRAINT pk_tl_ilo_job_title PRIMARY KEY
(
object_id
) ;
\ No newline at end of file
......@@ -41,7 +41,8 @@ CREATE TABLE tl_job (
hiring_team_id numeric(12) NULL,
occupation_id numeric(12) NOT NULL,
shortened_url_id numeric(12) NULL,
template_id numeric(12) NULL
template_id numeric(12) NULL,
job_title_id numeric(12) NOT NULL
);
......
......@@ -60,7 +60,8 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
newTemplate.setOccupation(job.getOccupation().getInTransaction(newObjTran));
newTemplate.setRequireCV(job.getRequireCV());
newTemplate.setAssessmentType(job.getAssessmentType());
newTemplate.setLevel(job.getLevel().getInTransaction(newObjTran));
// newTemplate.setLevel(job.getLevel().getInTransaction(newObjTran));
newTemplate.setILOJobTitle(job.getILOJobTitle().getInTransaction(newObjTran));
for (WorkFlow workflow : job.getWorkFlowsSet())
{
......
......@@ -3,6 +3,7 @@ package performa.orm;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import oneit.objstore.FieldWriteability;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.objstore.rdbms.filters.GreaterThanFilter;
import oneit.objstore.rdbms.filters.LessThanFilter;
......@@ -11,6 +12,7 @@ import oneit.utils.CollectionUtils;
import oneit.utils.ObjectTransform;
import oneit.utils.filter.CollectionFilter;
import oneit.utils.filter.Filter;
import oneit.utils.parsers.FieldException;
import performa.orm.types.AssessmentType;
import performa.orm.types.CriteriaType;
......@@ -92,4 +94,19 @@ public class AssessmentCriteriaTemplate extends BaseAssessmentCriteriaTemplate
{
return getAssessmentCriteraByType(criteria).size();
}
@Override
protected void postILOJobTitleChange() throws FieldException
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
setOccupation(occupation);
super.postILOJobTitleChange();
}
public Occupation displayOccupation()
{
return getOccupation();
}
}
\ No newline at end of file
......@@ -34,6 +34,7 @@
<SINGLEREFERENCE name="Client" type="Client" dbcol="client_id" />
<SINGLEREFERENCE name="HiringTeam" type="HiringTeam" dbcol="hiring_team_id" uniqueGroup="TemplateID"/>
<SINGLEREFERENCE name="CompanyUser" type="CompanyUser" dbcol="company_user_id" uniqueGroup="TemplateID"/>
<SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" mandatory="false"/>
</TABLE>
......
package performa.orm;
import java.io.*;
import java.util.*;
import oneit.appservices.config.*;
import oneit.logging.*;
import oneit.objstore.*;
import oneit.utils.*;
import performa.orm.types.*;
public class ILOJobTitle extends BaseILOJobTitle
{
private static final long serialVersionUID = 0L;
// This constructor should not be called
public ILOJobTitle ()
{
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public String getToString()
{
return StringUtils.subNulls(getJobTitle(), super.getToString());
}
}
<?xml version="1.0"?>
<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>
<BUSINESSCLASS name="ILOJobTitle" package="performa.orm">
<IMPORT value="performa.orm.types.*" />
<TABLE name="tl_ilo_job_title" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="JobTitle" type="String" dbcol="job_title" length="200" />
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" />
</TABLE>
<SEARCH type="All" paramFilter="object_id is not null" orderBy="object_id"/>
</BUSINESSCLASS>
</ROOT>
\ No newline at end of file
......@@ -719,4 +719,19 @@ public class Job extends BaseJob
return sb.toString();
}
@Override
protected void postILOJobTitleChange() throws FieldException
{
Occupation occupation = getILOJobTitle() != null ? getILOJobTitle().getOccupation() : null;
setOccupation(occupation);
super.postILOJobTitleChange();
}
public Occupation displayOccupation()
{
return getOccupation();
}
}
\ No newline at end of file
......@@ -67,6 +67,7 @@
<SINGLEREFERENCE name="Occupation" type="Occupation" dbcol="occupation_id" mandatory="true"/>
<SINGLEREFERENCE name="ShortenedURL" type="ShortenedURL" dbcol="shortened_url_id" />
<SINGLEREFERENCE name="AssessmentTemplate" type="AssessmentCriteriaTemplate" dbcol="template_id" />
<SINGLEREFERENCE name="ILOJobTitle" type="ILOJobTitle" dbcol="job_title_id" mandatory="true"/>
</TABLE>
......
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package performa.search;
import oneit.objstore.BaseBusinessClass;
import oneit.servlets.jsp.ORMTextSearcher;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.rdbms.filters.ILikeFilter;
import performa.orm.ILOJobTitle;
public class ILOJobTitleSearcher implements ORMTextSearcher
{
public static ILOJobTitleSearcher INSTANCE = new ILOJobTitleSearcher();
@Override
public BaseBusinessClass[] search(ObjectTransaction ot, String searchTerm)
{
return ILOJobTitle.SearchByAll().andJobTitle(new ILikeFilter(searchTerm, "%", "%")).search(ot);
}
}
......@@ -11,9 +11,31 @@
Job job = (Job) process.getAttribute("Job");
Debug.assertion(job != null && !toRedirect, "Invalid job in admin portal edit job");
ILOJobTitle iloJobTitle = job.getILOJobTitle();
if(iloJobTitle == null)
{
iloJobTitle = ILOJobTitle.createILOJobTitle(job.getTransaction());
}
Debug.assertion (iloJobTitle != null, "ILOJobTitle is null in admin portal create job");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
%>
<script type="text/javascript">
$(document).ready(function()
{
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').attr('placeholder','Please select a Job Title');
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').addClass("form-control");
$("#occupation span").addClass("form-control");
$("#occupation span").css("padding-top","15px");
});
</script>
<div class="container-fluid">
<div class="row content">
<div class="main-content-area">
......@@ -99,24 +121,34 @@
</div>
<div class="form-page-section">
<div class="form-group row">
<div class="col-md-12">
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="JobType" cssClass="form-control"/>
<div class="col-md-6">
<label><oneit:label GUIName="ILO Standard Job Title" /><a href="#" title="This is the set of International Labour Organisation job titles <br/> and is used to model the assessments applicable for this job" class="info-icon"><img src="images/info-icon.png" /></a></label><br/>
<tagfile:ormsingleasso_autocomplete obj="<%= job %>" assocName="ILOJobTitle" cssClass="form-control" searcher="<%= ILOJobTitleSearcher.INSTANCE %>" />
</div>
<div class="col-md-6" id="occupation">
<label><oneit:label GUIName="Job Occupation Classification" /></label><br/>
<%-- <input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= job.getOccupation() != null ? job.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= job %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/> --%>
<oneit:ormInput obj="<%= job %>" attributeName="OccupationId" type="hidden"/>
<oneit:recalc mode="EscapeHTML" script="job.displayOccupation()" job="<%= job %>"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="JobType" cssClass="form-control"/>
</div>
<div class="col-md-6">
<label><oneit:label GUIName="Job Occupation Classification" /></label>
<input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= job.getOccupation() != null ? job.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= job %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/>
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
</div>
</div>
</div>
<div class="text-center form-group">
<oneit:button value="Cancel and go to your jobs" name="gotoPage" cssClass="btn btn-primary largeBtn grey"
requestAttribs='<%= CollectionUtils.mapEntry("nextPage", nextPage)
......
......@@ -12,6 +12,15 @@
String samePage = WebUtils.getSamePageInRenderMode(request, WebUtils.EDIT_JOB_TEMP);
Debug.assertion(template != null && !toRedirect, "Invalid template in job templates");
ILOJobTitle iloJobTitle = template.getILOJobTitle();
if(iloJobTitle == null)
{
iloJobTitle = ILOJobTitle.createILOJobTitle(process.getTransaction());
}
Debug.assertion (iloJobTitle != null, "ILOJobTitle is null in admin portal create job");
SecUser secUser = SecUser.getTXUser(transaction);
CompanyUser companyUser = secUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
......@@ -149,6 +158,12 @@
});
$('input[type="text"][id$="Industry"]').attr('placeholder','Please select an Industry');
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').attr('placeholder','Please select a Job Title');
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').addClass("form-control");
$("#occupation span").addClass("form-control");
$("#occupation span").css("padding-top","15px");
});
......@@ -360,23 +375,35 @@
</div>
<div class="form-page-section">
<div class="form-group row">
<div class="col-md-12">
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= template %>" attributeName="JobType" cssClass="form-control"/>
<div class="col-md-6">
<label><oneit:label GUIName="ILO Standard Job Title" /><a href="#" title="This is the set of International Labour Organisation job titles <br/> and is used to model the assessments applicable for this job" class="info-icon"><img src="images/info-icon.png" /></a></label><br/>
<tagfile:ormsingleasso_autocomplete obj="<%= template %>" assocName="ILOJobTitle" cssClass="form-control" searcher="<%= ILOJobTitleSearcher.INSTANCE %>" />
</div>
<div class="col-md-6" id="occupation">
<label><oneit:label GUIName="Job Occupation Classification" /></label><br/>
<%-- <input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= job.getOccupation() != null ? job.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= job %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/> --%>
<oneit:ormInput obj="<%= template %>" attributeName="OccupationId" type="hidden"/>
<oneit:recalc mode="EscapeHTML" script="template.displayOccupation()" template="<%= template %>"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= template %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= template %>" attributeName="JobType" cssClass="form-control"/>
</div>
<div class="col-md-6">
<label><oneit:label GUIName="Job Occupation Classification" /></label>
<input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= template.getOccupation() != null ? template.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= template %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/>
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= template %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<div class="styled_checkboxes">
......
......@@ -6,10 +6,19 @@
<oneit:dynIncluded>
<%
Job job = (Job) process.getAttribute("Job");
String jobPage = WebUtils.getSamePageInRenderMode(request, "Page");
Job job = (Job) process.getAttribute("Job");
String jobPage = WebUtils.getSamePageInRenderMode(request, "Page");
Debug.assertion(job != null, "Job is null in admin portal create job");
ILOJobTitle iloJobTitle = job.getILOJobTitle();
if(iloJobTitle == null)
{
iloJobTitle = ILOJobTitle.createILOJobTitle(process.getTransaction());
}
Debug.assertion (iloJobTitle != null, "ILOJobTitle is null in admin portal create job");
SecUser txUser = SecUser.getTXUser(process.getTransaction());
CompanyUser companyUser = txUser.getExtension(CompanyUser.REFERENCE_CompanyUser);
......@@ -144,6 +153,13 @@
});
$('input[type="text"][id$="Industry"]').attr('placeholder','Please select an Industry');
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').attr('placeholder','Please select a Job Title');
$('input[type="text"][id$="ILOJobTitle_autocomplete"]').addClass("form-control");
$("#occupation span").addClass("form-control");
$("#occupation span").css("padding-top","15px");
});
......@@ -368,21 +384,34 @@
</div>
<div class="form-page-section">
<div class="form-group row">
<div class="col-md-12">
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="JobType" cssClass="form-control"/>
<div class="col-md-6">
<label><oneit:label GUIName="ILO Standard Job Title" /><a href="#" title="This is the set of International Labour Organisation job titles <br/> and is used to model the assessments applicable for this job" class="info-icon"><img src="images/info-icon.png" /></a></label><br/>
<tagfile:ormsingleasso_autocomplete obj="<%= job %>" assocName="ILOJobTitle" cssClass="form-control" searcher="<%= ILOJobTitleSearcher.INSTANCE %>" />
</div>
<div class="col-md-6" id="occupation">
<label><oneit:label GUIName="Job Occupation Classification" /></label><br/>
<%-- <input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= job.getOccupation() != null ? job.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= job %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/> --%>
<oneit:ormInput obj="<%= job %>" attributeName="OccupationId" type="hidden"/>
<oneit:recalc mode="EscapeHTML" script="job.displayOccupation()" job="<%= job %>"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
<label><oneit:label GUIName="Job Type" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="JobType" cssClass="form-control"/>
</div>
<div class="col-md-6">
<label><oneit:label GUIName="Job Occupation Classification" /></label>
<input type="text" class="form-control select-occupation search-input " placeholder="Select the occupation classification"
value="<%= job.getOccupation() != null ? job.getOccupation() : "Select the occupation classification"%>"></input>
<oneit:ormInput obj="<%= job %>" id="select-occupation-id" attributeName="OccupationId" type="hidden"/>
<label><oneit:label GUIName="Industry Classification" /></label>
<oneit:ormEnum obj="<%= job %>" attributeName="Industry" cssClass="form-control" displayType="autocomplete"/>
</div>
</div>
<div class="form-group row">
......
......@@ -178,6 +178,16 @@
</div>
<div class="row">
<div class="col-md-4 review-medium-title">
<oneit:label GUIName="ILO Job Title" />
</div>
<div class="col-md-8">
<span class="skill-label">
<oneit:toString value="<%= job.getILOJobTitle()%>" mode="EscapeHTML" nullValue="" />
</span>
</div>
</div>
<div class="row">
<div class="col-md-4 review-medium-title">
<oneit:label GUIName="Job Occupation Classification" />
</div>
<div class="col-md-8">
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_assessment_template</tableName>
<column name="job_title_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.DefineTableOperation">
<tableName factory="String">tl_ilo_job_title</tableName>
<column name="object_id" type="Long" nullable="false" length="11"/>
<column name="object_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="job_title" type="String" nullable="true" length="200"/>
<column name="occupation_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au"><NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_job</tableName>
<column name="job_title_id" type="Long" length="11" nullable="true"/>
</NODE>
</NODE></OBJECTS>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment