Commit bad2fe18 by nilu

S43014153 # Matchd / Talentology - No Plan [Enhancement] #Including diversity…

S43014153 # Matchd / Talentology - No Plan [Enhancement] #Including diversity questions in applicant process
parent 4f4c0d47
......@@ -8,6 +8,7 @@
<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="is_selected" type="Boolean" nullable="true"/>
<column name="candidate_answer_id" type="Long" length="11" nullable="false"/>
<column name="answer_id" type="Long" length="11" nullable="false"/>
</NODE>
......
......@@ -8,6 +8,7 @@ CREATE TABLE tl_answer_option (
object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL
,
is_selected char(1) NULL,
candidate_answer_id numeric(12) NOT NULL,
answer_id numeric(12) NOT NULL
);
......
......@@ -9,6 +9,7 @@ CREATE TABLE tl_answer_option (
object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL
,
is_selected char(1) NULL,
candidate_answer_id number(12) NOT NULL,
answer_id number(12) NOT NULL
);
......
......@@ -9,6 +9,7 @@ CREATE TABLE tl_answer_option (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL
,
is_selected char(1) NULL,
candidate_answer_id numeric(12) NOT NULL,
answer_id numeric(12) NOT NULL
);
......
package performa.form;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.MultiException;
import oneit.utils.filter.Filter;
import performa.orm.AnswerOption;
import performa.orm.Candidate;
import performa.orm.CandidateDiversityAnswer;
import performa.orm.HTDiversityQuestion;
import performa.orm.Job;
import performa.orm.JobApplication;
public class SaveDiversityAnswersFP extends SaveFP
{
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In SaveDiversityAnswersFP saving job application: ", jobApplication );
Candidate candidate = jobApplication.getCandidate();
Job job = jobApplication.getJob();
for(HTDiversityQuestion htQuestion : job.getDiversityQuestions())
{
CandidateDiversityAnswer diversityAnswer = candidate.getDiversityAnswerByQuestion(htQuestion.getQuestion());
for(AnswerOption answer : diversityAnswer.getAnswersSet())
{
if(!answer.isTrue(answer.getIsSelected()))
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In SaveDiversityAnswersFP deleting AnswerOption : ", answer );
answer.delete();
}
}
}
return super.processForm(process, submission, params);
}
@Override
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
Candidate candidate = jobApplication.getCandidate();
Job job = jobApplication.getJob();
for(HTDiversityQuestion htQuestion : job.getDiversityQuestions())
{
CandidateDiversityAnswer diversityAnswer = candidate.getDiversityAnswerByQuestion(htQuestion.getQuestion());
Filter<AnswerOption> filter = AnswerOption.SearchByAll().andIsSelected(new EqualsFilter<>(Boolean.TRUE));
BusinessObjectParser.assertFieldCondition(diversityAnswer.pipelineCandidateDiversityAnswer().toAnswers(filter).uniqueVals().size() >= 1 , diversityAnswer, CandidateDiversityAnswer.MULTIPLEREFERENCE_Answers, "atleastOneAnswer", exceptions, true, request);
}
super.validate(process, submission, exceptions, params);
}
}
\ No newline at end of file
......@@ -66,13 +66,6 @@ public class SendVerificationMailFP extends SaveFP
BusinessObjectParser.assertFieldCondition(candidate.getGoogleAddressText() != null, candidate, Candidate.FIELD_GoogleAddressText, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getHasValidAddress()), candidate, Candidate.FIELD_GoogleAddressText, "invalid", exceptions, true, request);
if(candidate.getAnsweredDiversity())
{
for(HTDiversityQuestion htQuestion : job.getDiversityQuestions())
{
BusinessObjectParser.assertFieldCondition(candidate.hasAnswer(htQuestion), candidate, Candidate.MULTIPLEREFERENCE_DiversityAnswers, "mandatory", exceptions, true, request);
}
}
}
super.validate(process, submission, exceptions, params);
......@@ -138,11 +131,6 @@ public class SendVerificationMailFP extends SaveFP
}
else
{
if(job.hasDiversityQuestions() && candidate.isFalse(candidate.getAnsweredDiversity()))
{
return super.processForm(process, submission, params);
}
if(candidate.isTrue(candidate.getIsEmailIngest()) || jobApplication.getApplicationStatus() == ApplicationStatus.POST_INGEST)
{
if(candidate.isFalse(candidate.getIsMaskedEmail()))
......
......@@ -5,7 +5,9 @@
<BUSINESSCLASS name="AnswerOption" package="performa.orm">
<TABLE name="tl_answer_option" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="IsSelected" type="Boolean" dbcol="is_selected" defaultValue="Boolean.FALSE" />
<SINGLEREFERENCE name="CandidateAnswer" type="CandidateDiversityAnswer" dbcol="candidate_answer_id" mandatory="true" backreferenceName="Answers"/>
<SINGLEREFERENCE name="Answer" type="DiversityAnswer" dbcol="answer_id" mandatory="true" />
......
......@@ -26,19 +26,22 @@ public class AnswerOptionPersistenceMgr extends ObjectPersistenceMgr
private static final LoggingArea AnswerOptionPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "AnswerOption");
// Private attributes corresponding to business object data
private Boolean dummyIsSelected;
// Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_IsSelected = DefaultAttributeHelper.INSTANCE;
public AnswerOptionPersistenceMgr ()
{
dummyIsSelected = (Boolean)(HELPER_IsSelected.initialise (dummyIsSelected));
}
private String SELECT_COLUMNS = "{PREFIX}tl_answer_option.object_id as id, {PREFIX}tl_answer_option.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_answer_option.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_answer_option.candidate_answer_id, {PREFIX}tl_answer_option.answer_id, 1 AS commasafe ";
private String SELECT_COLUMNS = "{PREFIX}tl_answer_option.object_id as id, {PREFIX}tl_answer_option.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_answer_option.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_answer_option.is_selected, {PREFIX}tl_answer_option.candidate_answer_id, {PREFIX}tl_answer_option.answer_id, 1 AS commasafe ";
private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
......@@ -89,6 +92,7 @@ public class AnswerOptionPersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched
if (false || !tl_answer_optionPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_answer_optionPSet.containsAttrib(AnswerOption.FIELD_IsSelected)||
!tl_answer_optionPSet.containsAttrib(AnswerOption.SINGLEREFERENCE_CandidateAnswer)||
!tl_answer_optionPSet.containsAttrib(AnswerOption.SINGLEREFERENCE_Answer))
{
......@@ -170,10 +174,10 @@ public class AnswerOptionPersistenceMgr extends ObjectPersistenceMgr
{
int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_answer_option " +
"SET candidate_answer_id = ? , answer_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"SET is_selected = ?, candidate_answer_id = ? , answer_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_answer_option.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_CandidateAnswer)))).listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_Answer)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
CollectionUtils.listEntry (HELPER_IsSelected.getForSQL(dummyIsSelected, tl_answer_optionPSet.getAttrib (AnswerOption.FIELD_IsSelected))).listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_CandidateAnswer)))).listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_Answer)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1)
{
......@@ -429,6 +433,7 @@ public class AnswerOptionPersistenceMgr extends ObjectPersistenceMgr
// Object Created
tl_answer_optionPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_answer_optionPSet.setAttrib(AnswerOption.FIELD_IsSelected, HELPER_IsSelected.getFromRS(dummyIsSelected, r, "is_selected"));
tl_answer_optionPSet.setAttrib(AnswerOption.SINGLEREFERENCE_CandidateAnswer, r.getObject ("candidate_answer_id"));
tl_answer_optionPSet.setAttrib(AnswerOption.SINGLEREFERENCE_Answer, r.getObject ("answer_id"));
......@@ -448,10 +453,10 @@ public class AnswerOptionPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_answer_option " +
" ( candidate_answer_id, answer_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
" (is_selected, candidate_answer_id, answer_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " +
" ( ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils .listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_CandidateAnswer)))).listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_Answer)))) .listEntry (objectID.longID ()).toList().toArray());
" (?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_IsSelected.getForSQL(dummyIsSelected, tl_answer_optionPSet.getAttrib (AnswerOption.FIELD_IsSelected))) .listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_CandidateAnswer)))).listEntry (SQLManager.CheckNull((Long)(tl_answer_optionPSet.getAttrib (AnswerOption.SINGLEREFERENCE_Answer)))) .listEntry (objectID.longID ()).toList().toArray());
tl_answer_optionPSet.setStatus (PersistentSetStatus.PROCESSED);
}
......
......@@ -112,6 +112,20 @@ public class Candidate extends BaseCandidate
}
public boolean diversityCompleted(Job job)
{
Set<AnswerOption> selectedAnswers = pipelineCandidate().toDiversityAnswers().toAnswers(AnswerOption.SearchByAll().andAnswer(new IsNotNullFilter<>())).uniqueVals();
Set<DiversityQuestion> answeredQuestions = AnswerOption.pipesAnswerOption(selectedAnswers).toCandidateAnswer().toQuestion().uniqueVals();
Set<DiversityQuestion> applicableQuestions = HTDiversityQuestion.pipesHTDiversityQuestion(job.getDiversityQuestions()).toQuestion().uniqueVals();
return answeredQuestions.containsAll(applicableQuestions);
}
public CandidateDiversityAnswer getDiversityAnswerByQuestion(DiversityQuestion question)
{
return pipelineCandidate().toDiversityAnswers(CandidateDiversityAnswer.SearchByAll().andQuestion(new EqualsFilter<>(question))).val();
}
public boolean cultureCompleted(Job job)
{
if(!job.showCultureCriteriaSection())
......@@ -238,8 +252,6 @@ public class Candidate extends BaseCandidate
public Boolean hasAnswer(HTDiversityQuestion htQuestion)
{
return Boolean.FALSE;
}
}
\ No newline at end of file
......@@ -15,7 +15,6 @@
<TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="HasValidAddress" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="AnsweredDiversity" type="Boolean" defaultValue="Boolean.FALSE"/>
<TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE">
......
......@@ -19,15 +19,15 @@ public class CandidateDiversityAnswer extends BaseCandidateDiversityAnswer
if(htQuestion != null)
{
for(CultureCriteria cc: htQuestion.getQ)
{
if(CollectionUtils.equals(cc.getCultureElement(), getCultureElement()))
{
criteria = cc;
break;
}
}
// for(CultureCriteria cc: htQuestion.getQ)
// {
// if(CollectionUtils.equals(cc.getCultureElement(), getCultureElement()))
// {
// criteria = cc;
//
// break;
// }
// }
}
return answer;
......
......@@ -199,6 +199,53 @@ public class JobApplication extends BaseJobApplication
return safeRedirect;
}
public boolean createDiversityAnswerObjects() throws FieldException
{
boolean safeRedirect = false;
Candidate candidate = getCandidate();
//to skip diversity test
if(!isDiversityIncluded() || diversityCompleted())
{
return safeRedirect;
}
for(HTDiversityQuestion htQuestion : getJob().getDiversityQuestions())
{
DiversityQuestion question = htQuestion.getQuestion();
boolean available = false;
for(CandidateDiversityAnswer answer : getCandidate().getDiversityAnswersSet())
{
if(answer.getQuestion().equals(question))
{
available = true;
break;
}
}
if(!available)
{
CandidateDiversityAnswer answer = CandidateDiversityAnswer.createCandidateDiversityAnswer(getTransaction());
for(DiversityAnswer diversityAnswer : question.getAnswersSet())
{
AnswerOption answerOption = AnswerOption.createAnswerOption(getTransaction());
answer.addToAnswers(answerOption);
answerOption.setAnswer(diversityAnswer);
}
candidate.addToDiversityAnswers(answer);
answer.setQuestion(question);
safeRedirect = true;
}
}
return safeRedirect;
}
public Answer getAnswerForQuestion(Question question) throws FieldException
{
......@@ -254,6 +301,11 @@ public class JobApplication extends BaseJobApplication
return isIncludeCultureCriteria() ? getCandidate().cultureCompleted(getJob()) : true;
}
public boolean diversityCompleted()
{
return getCandidate().diversityCompleted(getJob());
}
public boolean assessmentCompleted() //role
{
......@@ -287,6 +339,11 @@ public class JobApplication extends BaseJobApplication
{
return getJob() != null && isTrue(getJob().getIncludeCulture());
}
public boolean isDiversityIncluded()
{
return getJob() != null && getJob().hasDiversityQuestions();
}
@Override
public Map getRoleFit()
......
......@@ -168,6 +168,21 @@
<oneit:toString value="<%= job.getRequireCV() ? "Yes" : "No" %>" mode="EscapeHTML"/>
</div>
</div>
<%
if(job.getHiringTeam().showHasDiversity())
{
%>
<div class="form-group row">
<div class="col-md-4">
<label><oneit:label GUIName="Will the Diversity module be used for this Job?" /></label>
</div>
<div class="col-md-8">
<oneit:toString value="<%= job.getDiversityIncluded() ? "Yes" : "No" %>" mode="EscapeHTML"/>
</div>
</div>
<%
}
%>
<div class="form-brack-line-sub"></div>
<div class="form-group row">
<div class="col-md-4">
......
......@@ -206,6 +206,23 @@
</span>
</div>
</div>
<%
if(job.getHiringTeam().showHasDiversity())
{
%>
<div class="row">
<div class="col-md-4 review-medium-title">
<oneit:label GUIName="Will the Diversity module be used for this Job?" />
</div>
<div class="col-md-8">
<span class="skill-label">
<oneit:toString value="<%= job.getDiversityIncluded() ? "Yes" : "No" %>" mode="EscapeHTML" />
</span>
</div>
</div>
<%
}
%>
</div>
<div class="form-brack-line-sub"></div>
<div class="form-group job-detail-subsection">
......
......@@ -9,7 +9,7 @@
<value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='australia_only' factory='Boolean'>true</value>
<value name='multiple_answers' factory='Boolean'>true</value>
<value name='multiple_answers' factory='Boolean'>false</value>
<value name='question_text' factory='String'>Do you identify as a person of Aboriginal or Torres Strait Islander origin?</value>
<value name='question_code' factory='String'>ATSI</value>
</NODE>
......@@ -19,7 +19,7 @@
<value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
<value name='australia_only' factory='Boolean'>false</value>
<value name='multiple_answers' factory='Boolean'>false</value>
<value name='multiple_answers' factory='Boolean'>true</value>
<value name='question_text' factory='String'>Do you identify as a person living with a disability?</value>
<value name='question_code' factory='String'>DISABLED</value>
</NODE>
......
......@@ -9,6 +9,7 @@
<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="is_selected" type="Boolean" nullable="true"/>
<column name="candidate_answer_id" type="Long" length="11" nullable="false"/>
<column name="answer_id" type="Long" length="11" nullable="false"/>
</NODE>
......
......@@ -10,6 +10,7 @@
<FORM name="*.saveAndExitExperienece" factory="Participant" class="performa.form.SaveAndExitExperienceFP"/>
<FORM name="*.saveAndExitCulture" factory="Participant" class="performa.form.SaveAndExitCultureFP"/>
<FORM name="*.saveAndExitWorkStyle" factory="Participant" class="performa.form.SaveAndExitWorkStypeFP"/>
<FORM name="*.saveDiversityAnswers" factory="Participant" class="performa.form.SaveDiversityAnswersFP"/>
<FORM name="*.sendVerificationMail" factory="Participant" class="performa.form.SendVerificationMailFP">
<AccountVerificationEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="AccountVerificationMail"/>
</FORM>
......
......@@ -20,12 +20,8 @@
String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent") + "&JobID=" + job.getID();
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
boolean redirectUser = jobApplication != null && jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT;
if(jobApplication == null)
{
jobApplication = JobApplication.createNewApplication(candidate, job);
}
Debug.assertion(jobApplication != null, "Invalid Job Application in applicant portal");
Boolean isSelectionComplete = jobApplication.selectionCompleted();
Boolean isCultureComplete = jobApplication.cultureCompleted();
......@@ -53,15 +49,13 @@
+ jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "JobMatchAssessment").toMap(), "/");
}
toRedirect = jobApplication.createDiversityAnswerObjects();
if(redirectUser)
if(toRedirect)
{
response.sendRedirect(candidate.isFalse(candidate.getIsAccountVerified()) ? successPage : nextPage +"&JobApplicationID="+ jobApplication.getID().toString());
%><%@include file="/saferedirect.jsp" %><%
}
candidate.setHasValidAddress(candidate.getGoogleAddressText() != null);
candidate.setAnsweredDiversity(true);
process.setAttribute("JobApplication", jobApplication);
%>
<oneit:form name="diversity" method="post" enctype="multipart/form-data">
......@@ -93,24 +87,57 @@
</div>
</div>
<div class="main-verify-identity">
<div class="main-box-layout main-verify-step-2">
<%
for(HTDiversityQuestion question : job.getDiversityQuestions())
{
DiversityQuestion originalQuestion = question.getQuestion();
CandidateDiversityAnswer candidateAnswer = candidate.getDiversityAnswerByQuestion(originalQuestion);
%>
<div class="form-group text-left">
<label><%= question.getQuestionText() %></label>
<%
for(AnswerOption answer : candidateAnswer.getAnswersSet())
{
if(originalQuestion.getMultipleAnswers())
{
%>
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= answer %>" id="<%= answer.getObjectID() %>" attributeName="IsSelected" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="answer.getIsSelected() ? 'checked': 'unchecked'" answer="<%= answer %>">
<label for="<%= answer.getObjectID() %>">
<%= answer.getAnswer().getAnswer() %>
</label>
</oneit:recalcClass>
</div>
</div>
<%
}
else
{
%>
<div class="radio radio-primary second-radio-primary full-width">
<input type="radio" name="<%= candidateAnswer.getObjectID() %>" value="<%= answer.getIsSelected() %>" id="<%= answer.getObjectID() %>"/>
<label for="<%= answer.getObjectID() %>">
<%= answer.getAnswer().getAnswer() %>
</label>
</div>
<%
}
}
%>
</div>
<hr class="seperate-line">
<%
}
%>
<div class="text-center">
<oneit:button value="Submit" name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.toMap() %>"/>
<div class="text-center">
<oneit:button value="Submit" name="saveDiversityAnswers" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("JobApplication",jobApplication)
.toMap() %>"/>
</div>
</div>
</div>
</oneit:form>
......
......@@ -7,3 +7,4 @@
#alreadyApplied = You have already applied for this job.
#uploadCover = Please upload your Cover Letter.
#uploadCV = Please upload your CV.
#atleastOneAnswer = Please select an answer to each question.
......@@ -6,7 +6,6 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran = process.getTransaction ();
String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent");
Article applicationArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.JOB_APPLICATION);
String nextPage = applicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "ConfirmDetails").toMap());
Job job = (Job) process.getAttribute("Job");
......
......@@ -18,7 +18,6 @@
Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent") + "&JobID=" + job.getID();
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
boolean redirectUser = jobApplication != null && jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT;
......@@ -27,13 +26,19 @@
jobApplication = JobApplication.createNewApplication(candidate, job);
}
Boolean isDiversityComplete = jobApplication.diversityCompleted();
Boolean isSelectionComplete = jobApplication.selectionCompleted();
Boolean isCultureComplete = jobApplication.cultureCompleted();
Boolean isAssesmentComplete = jobApplication.assessmentCompleted();
Article jobApplicationArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION);
String nextPage = jobApplicationArticle.getLink(request) + "?JobID="+ job.getID().toString();;
String nextPage = jobApplicationArticle.getLink(request) + "?JobID="+ job.getID().toString();
String successPage = WebUtils.getSamePageInRenderMode(request, jobApplication.isDiversityIncluded() ? "DiversityQuestions" : "VerificationSent") + "&JobID=" + job.getID();
if(!jobApplication.hasStartedApplication())
if(!isDiversityComplete)
{
nextPage = WebUtils.getSamePageInRenderMode(request, "DiversityQuestions") + "&JobID=" + job.getID();
}
else if(!jobApplication.hasStartedApplication())
{
nextPage = WebUtils.getArticleLink(request, transaction, WebUtils.JOB_APPLICATION, "Page") + "&JobID="+ job.getID().toString();
}
......@@ -53,7 +58,6 @@
+ jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "JobMatchAssessment").toMap(), "/");
}
if(redirectUser)
{
response.sendRedirect(candidate.isFalse(candidate.getIsAccountVerified()) ? successPage : nextPage +"&JobApplicationID="+ jobApplication.getID().toString());
......@@ -319,7 +323,7 @@
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
// .mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.toMap() %>"/>
</div>
</div>
......
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