Commit ed157008 by nilu

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

S43014153 # Matchd / Talentology - No Plan [Enhancement] #Including diversity questions in applicant process
parent b0989a5f
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<column name="object_id" type="Long" nullable="false" length="11"/> <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_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="question_code" type="CLOB" nullable="false"/>
<column name="question_text" type="CLOB" nullable="false"/> <column name="question_text" type="CLOB" nullable="false"/>
<column name="australia_only" type="Boolean" nullable="true"/> <column name="australia_only" type="Boolean" nullable="true"/>
</NODE> </NODE>
......
...@@ -8,6 +8,7 @@ CREATE TABLE tl_diversity_question ( ...@@ -8,6 +8,7 @@ CREATE TABLE tl_diversity_question (
object_last_updated_date datetime DEFAULT getdate() NOT NULL , object_last_updated_date datetime DEFAULT getdate() NOT NULL ,
object_created_date datetime DEFAULT getdate() NOT NULL object_created_date datetime DEFAULT getdate() NOT NULL
, ,
question_code text NOT NULL,
question_text text NOT NULL, question_text text NOT NULL,
australia_only char(1) NULL australia_only char(1) NULL
); );
......
...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_question ( ...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_question (
object_last_updated_date date DEFAULT SYSDATE NOT NULL , object_last_updated_date date DEFAULT SYSDATE NOT NULL ,
object_created_date date DEFAULT SYSDATE NOT NULL object_created_date date DEFAULT SYSDATE NOT NULL
, ,
question_code clob NOT NULL,
question_text clob NOT NULL, question_text clob NOT NULL,
australia_only char(1) NULL australia_only char(1) NULL
); );
......
...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_question ( ...@@ -9,6 +9,7 @@ CREATE TABLE tl_diversity_question (
object_last_updated_date timestamp DEFAULT NOW() NOT NULL , object_last_updated_date timestamp DEFAULT NOW() NOT NULL ,
object_created_date timestamp DEFAULT NOW() NOT NULL object_created_date timestamp DEFAULT NOW() NOT NULL
, ,
question_code text NOT NULL,
question_text text NOT NULL, question_text text NOT NULL,
australia_only char(1) NULL australia_only char(1) NULL
); );
......
...@@ -129,6 +129,11 @@ public class SendVerificationMailFP extends SaveFP ...@@ -129,6 +129,11 @@ public class SendVerificationMailFP extends SaveFP
} }
else 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.isTrue(candidate.getIsEmailIngest()) || jobApplication.getApplicationStatus() == ApplicationStatus.POST_INGEST)
{ {
if(candidate.isFalse(candidate.getIsMaskedEmail())) if(candidate.isFalse(candidate.getIsMaskedEmail()))
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="PrivacyPolicyAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="ConditionsAgreed" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="HasValidAddress" 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"> <TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE">
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<TABLE name="tl_diversity_question" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_diversity_question" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="Code" type="String" dbcol="question_code" mandatory="true"/>
<ATTRIB name="QuestionText" type="String" dbcol="question_text" mandatory="true"/> <ATTRIB name="QuestionText" type="String" dbcol="question_text" mandatory="true"/>
<ATTRIB name="AustraliaOnly" type="Boolean" dbcol="australia_only" defaultValue="Boolean.FALSE" /> <ATTRIB name="AustraliaOnly" type="Boolean" dbcol="australia_only" defaultValue="Boolean.FALSE" />
......
...@@ -26,11 +26,13 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr ...@@ -26,11 +26,13 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr
private static final LoggingArea DiversityQuestionPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "DiversityQuestion"); private static final LoggingArea DiversityQuestionPersistence = LoggingArea.createLoggingArea(ObjectPersistenceMgr.OBJECT_PERSISTENCE, "DiversityQuestion");
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
private String dummyCode;
private String dummyQuestionText; private String dummyQuestionText;
private Boolean dummyAustraliaOnly; private Boolean dummyAustraliaOnly;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
private static final DefaultAttributeHelper HELPER_Code = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_QuestionText = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_QuestionText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_AustraliaOnly = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_AustraliaOnly = DefaultAttributeHelper.INSTANCE;
...@@ -39,12 +41,13 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr ...@@ -39,12 +41,13 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr
public DiversityQuestionPersistenceMgr () public DiversityQuestionPersistenceMgr ()
{ {
dummyCode = (String)(HELPER_Code.initialise (dummyCode));
dummyQuestionText = (String)(HELPER_QuestionText.initialise (dummyQuestionText)); dummyQuestionText = (String)(HELPER_QuestionText.initialise (dummyQuestionText));
dummyAustraliaOnly = (Boolean)(HELPER_AustraliaOnly.initialise (dummyAustraliaOnly)); dummyAustraliaOnly = (Boolean)(HELPER_AustraliaOnly.initialise (dummyAustraliaOnly));
} }
private String SELECT_COLUMNS = "{PREFIX}tl_diversity_question.object_id as id, {PREFIX}tl_diversity_question.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_diversity_question.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_diversity_question.question_text, {PREFIX}tl_diversity_question.australia_only, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_diversity_question.object_id as id, {PREFIX}tl_diversity_question.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_diversity_question.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_diversity_question.question_code, {PREFIX}tl_diversity_question.question_text, {PREFIX}tl_diversity_question.australia_only, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -95,6 +98,7 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr ...@@ -95,6 +98,7 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr
// Check for persistent sets already prefetched // Check for persistent sets already prefetched
if (false || !tl_diversity_questionPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) || if (false || !tl_diversity_questionPSet.containsAttrib(BaseBusinessClass.FIELD_ObjectLastModified) ||
!tl_diversity_questionPSet.containsAttrib(DiversityQuestion.FIELD_Code)||
!tl_diversity_questionPSet.containsAttrib(DiversityQuestion.FIELD_QuestionText)|| !tl_diversity_questionPSet.containsAttrib(DiversityQuestion.FIELD_QuestionText)||
!tl_diversity_questionPSet.containsAttrib(DiversityQuestion.FIELD_AustraliaOnly)) !tl_diversity_questionPSet.containsAttrib(DiversityQuestion.FIELD_AustraliaOnly))
{ {
...@@ -166,10 +170,10 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr ...@@ -166,10 +170,10 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_diversity_question " + "UPDATE {PREFIX}tl_diversity_question " +
"SET question_text = ?, australia_only = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET question_code = ?, question_text = ?, australia_only = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_diversity_question.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_diversity_question.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_QuestionText.getForSQL(dummyQuestionText, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_QuestionText))).listEntry (HELPER_AustraliaOnly.getForSQL(dummyAustraliaOnly, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_AustraliaOnly))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_Code))).listEntry (HELPER_QuestionText.getForSQL(dummyQuestionText, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_QuestionText))).listEntry (HELPER_AustraliaOnly.getForSQL(dummyAustraliaOnly, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_AustraliaOnly))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -425,6 +429,7 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr ...@@ -425,6 +429,7 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr
// Object Created // Object Created
tl_diversity_questionPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE")); tl_diversity_questionPSet.setAttrib(BaseBusinessClass.FIELD_ObjectCreated, r.getTimestamp ("CREATED_DATE"));
tl_diversity_questionPSet.setAttrib(DiversityQuestion.FIELD_Code, HELPER_Code.getFromRS(dummyCode, r, "question_code"));
tl_diversity_questionPSet.setAttrib(DiversityQuestion.FIELD_QuestionText, HELPER_QuestionText.getFromRS(dummyQuestionText, r, "question_text")); tl_diversity_questionPSet.setAttrib(DiversityQuestion.FIELD_QuestionText, HELPER_QuestionText.getFromRS(dummyQuestionText, r, "question_text"));
tl_diversity_questionPSet.setAttrib(DiversityQuestion.FIELD_AustraliaOnly, HELPER_AustraliaOnly.getFromRS(dummyAustraliaOnly, r, "australia_only")); tl_diversity_questionPSet.setAttrib(DiversityQuestion.FIELD_AustraliaOnly, HELPER_AustraliaOnly.getFromRS(dummyAustraliaOnly, r, "australia_only"));
...@@ -444,10 +449,10 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr ...@@ -444,10 +449,10 @@ public class DiversityQuestionPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_diversity_question " + "INSERT INTO {PREFIX}tl_diversity_question " +
" (question_text, australia_only, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (question_code, question_text, australia_only, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_QuestionText.getForSQL(dummyQuestionText, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_QuestionText))).listEntry (HELPER_AustraliaOnly.getForSQL(dummyAustraliaOnly, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_AustraliaOnly))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Code.getForSQL(dummyCode, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_Code))).listEntry (HELPER_QuestionText.getForSQL(dummyQuestionText, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_QuestionText))).listEntry (HELPER_AustraliaOnly.getForSQL(dummyAustraliaOnly, tl_diversity_questionPSet.getAttrib (DiversityQuestion.FIELD_AustraliaOnly))) .listEntry (objectID.longID ()).toList().toArray());
tl_diversity_questionPSet.setStatus (PersistentSetStatus.PROCESSED); tl_diversity_questionPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -6,8 +6,6 @@ import java.util.Date; ...@@ -6,8 +6,6 @@ import java.util.Date;
import java.util.Set; import java.util.Set;
import oneit.logging.LoggingArea; import oneit.logging.LoggingArea;
import oneit.objstore.FieldWriteability; import oneit.objstore.FieldWriteability;
import oneit.objstore.StorageException;
import oneit.objstore.ValidationContext;
import oneit.objstore.rdbms.filters.EqualsFilter; import oneit.objstore.rdbms.filters.EqualsFilter;
import oneit.security.SecUser; import oneit.security.SecUser;
import oneit.utils.BusinessException; import oneit.utils.BusinessException;
...@@ -39,7 +37,7 @@ public class HiringTeam extends BaseHiringTeam ...@@ -39,7 +37,7 @@ public class HiringTeam extends BaseHiringTeam
return isTrue(getHasClientSupport()); return isTrue(getHasClientSupport());
} }
public boolean showHasDiversity() throws StorageException, FieldException public boolean showHasDiversity()
{ {
return isTrue(getHasDiversity()); return isTrue(getHasDiversity());
} }
......
...@@ -810,5 +810,12 @@ public class Job extends BaseJob ...@@ -810,5 +810,12 @@ public class Job extends BaseJob
{ {
return getOccupation(); return getOccupation();
} }
public boolean hasDiversityQuestions()
{
Filter<HTDiversityQuestion> filter = HTDiversityQuestion.SearchByAll().andIsApplicable(new EqualsFilter<>(Boolean.TRUE));
return getDiversityIncluded() && getHiringTeam().showHasDiversity() && pipelineJob().toHiringTeam().toDiversityQuestions(filter).uniqueVals().size() > 0;
}
} }
\ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<column name="object_id" type="Long" nullable="false" length="11"/> <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_last_updated_date" type="Date" nullable="false" length="22"/>
<column name="object_created_date" type="Date" nullable="false" length="22"/> <column name="object_created_date" type="Date" nullable="false" length="22"/>
<column name="question_code" type="CLOB" nullable="false"/>
<column name="question_text" type="CLOB" nullable="false"/> <column name="question_text" type="CLOB" nullable="false"/>
<column name="australia_only" type="Boolean" nullable="true"/> <column name="australia_only" type="Boolean" nullable="true"/>
</NODE> </NODE>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<value name='object_created_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='australia_only' factory='Boolean'>true</value>
<value name='question_text' factory='String'>Do you identify as a person of Aboriginal or Torres Strait Islander origin?</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> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_question</tableName> <tableName factory="String">tl_diversity_question</tableName>
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
<value name='object_created_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='australia_only' factory='Boolean'>false</value>
<value name='question_text' factory='String'>Do you identify as a person living with a disability?</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> </NODE>
<NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"> <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
<tableName factory="String">tl_diversity_question</tableName> <tableName factory="String">tl_diversity_question</tableName>
...@@ -26,6 +28,7 @@ ...@@ -26,6 +28,7 @@
<value name='object_created_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='australia_only' factory='Boolean'>false</value>
<value name='question_text' factory='String'>I identify by gender as</value> <value name='question_text' factory='String'>I identify by gender as</value>
<value name='question_code' factory='String'>GENDER</value>
</NODE> </NODE>
......
UPDATE tl_job SET diversity_included = 'N';
\ No newline at end of file
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<RenderMode name="Page" preIncludeJSP="extensions/applicantportal/job_overview.jsp"/> <RenderMode name="Page" preIncludeJSP="extensions/applicantportal/job_overview.jsp"/>
<RenderMode name="SignIn" preIncludeJSP="extensions/applicantportal/sign_in.jsp"/> <RenderMode name="SignIn" preIncludeJSP="extensions/applicantportal/sign_in.jsp"/>
<RenderMode name="VerifyIdentity" preIncludeJSP="extensions/applicantportal/verify_identity.jsp"/> <RenderMode name="VerifyIdentity" preIncludeJSP="extensions/applicantportal/verify_identity.jsp"/>
<RenderMode name="DiversityQuestions" preIncludeJSP="extensions/applicantportal/diversity_questions.jsp"/>
<RenderMode name="MaskedIdentity" preIncludeJSP="extensions/applicantportal/masked_identity.jsp"/> <RenderMode name="MaskedIdentity" preIncludeJSP="extensions/applicantportal/masked_identity.jsp"/>
<RenderMode name="VerificationSent" preIncludeJSP="extensions/applicantportal/verification_sent.jsp"/> <RenderMode name="VerificationSent" preIncludeJSP="extensions/applicantportal/verification_sent.jsp"/>
<RenderMode name="ForgotPassword" preIncludeJSP="extensions/applicantportal/forgot_password.jsp"/> <RenderMode name="ForgotPassword" preIncludeJSP="extensions/applicantportal/forgot_password.jsp"/>
......
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