Hi,

First of all, thanks for creating such a great module!

I'm interested in being able to select a short-list of applicants online (to filter high volumes of applicants per job). For this, I would envision a checkbox (probably using Views Bulk Operations module) in a "list of applicants" view which would allow the employer to select the short-listed applicants.

However, for this to work, I think there would need to be a field for "shortlist" (or something similar) in the job database table, which would correspond to the joined applicant/job record. Then I'd want to be able to create a view of the short-listed applicants based on the selected short-list value for each item in the job table.

I think the above strategy would work, but I have absolutely no idea how to get to that new "shortlist" field from a view...

Any suggestions or help?

Comments

barckhoff’s picture

Category: feature » support
barckhoff’s picture

OK, well if anyone else is looking to do this... I've answered my own question.

The Job Search module comes with some basic views that get added to your profile page. They have a "clear" function, which I realized can be used to do this shortlisting I wanted to do.

So, what I did was modify a bit of code in the job.module file to remove the hard-coded return to the job/applications view and instead to make it go back to the referring page (which will, in this case, be my custom view):

function job_clear($nid, $uid) {
if ($nid && $uid) {
db_query("UPDATE {job} SET status = 0 WHERE nid = %d AND uid = %d", $nid, $uid);
drupal_set_message(t('Job application #@nid has been removed from the list.', array('@nid' => $nid)));
}
// Next line removed
//drupal_goto('job/applications');

// Next two lines changed to go to referring page
$referer = referer_uri();
drupal_goto($referer);
}

Then I created my custom view, with Job: Resume Applicant ID as hidden fields in the view. Then AFTER this field, I created a field for Job: Job Node ID and checked "Rewrite output of this field" and added the following HTML code:

<a href="job/clear/[nid]/[uid_1]">Remove</a>
(use the values for "Job node ID" and "user ID" in the replacement patterns displayed to you)

The above HTML link will call the job_clear function that comes with this module and pass the values of the two hidden fields as parameters, which will change the status field in the job table to 0 from 1, effectively creating a shortlist.