Patch for Job Search 6.x-1.x-dev - User profile updates and Views 2 integration

jrosen - March 5, 2009 - 08:54
Project:Job Search
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:jobsearch
Description

I have done some work to port the rest of the Job Search module to Drupal 6.

The patch includes the following features:
* Correctly includes links into the User Profile page for Job Applications (I was having trouble with the link not appearing)
* Includes Views 2 integration w/relationships to the Users table so complex JOINS can be used to relate Jobs with Users
* Includes the 3 default views for Views 2 that were included with the Drupal 5 version
* For those users with the permission JOB_PERM_APPLY, a link on the User Profile page for "Jobs Applied For"

Please test and let me know what you think.

AttachmentSize
jobsearch.patch47.02 KB

#1

kbahey - March 5, 2009 - 12:06
Status:active» needs review

Thank you so much for this.

Can people please test this patch and verify that it works?

#2

jchatard - March 6, 2009 - 14:01

Hey guys!

I've just tested the patch, all seems to work properly, there are maybe use cases I didn't checked.

I corrected the patch because path were absolute, so I make them relative.

Thnak you jrosen
Jérémy

AttachmentSize
jobsearch-relative-path.patch 45.52 KB

#3

jchatard - March 6, 2009 - 14:02
Status:needs review» reviewed & tested by the community

Just forgot to update status!

Jérémy

#4

xamount - March 7, 2009 - 18:49
Title:Patch for Job Search 6.x-1.x-dev » Patch for Job Search 6.x-1.x-dev - User profile updates and Views 2 integration

just updating the title to reflect a more descriptive meaning

#5

jrosen - March 10, 2009 - 18:18

When I originally posted the patch, I forgot to mention that I included another feature I didn't mention:

  • The "Please Create a Resume to Apply Link" does not bring the user to the "Create Content" page.

    It loops through the assigned resume content-types (the ones assigned in admin/settings/job), and the first content-type in the list is automatically redirected to by going to "node/add/".

    So for instance, if you have a content-type called "cv" checked off in the list in admin/settings/job, then "Please Create a Resume to Apply Link" will redirect to "node/add/cv" instead of "node/add".

This feature is one that was requested in Issue #381462: Apply for Job Needs to Send User to Create Resume Form.

I didn't actually mean to include it in my patch, I meant to include it in a separate patch at a later time. So anyway, not sure if I sure mark issue #381462 as a duplicate or not.

Jason

#6

adpo - March 11, 2009 - 10:46

This patch is not working for me. PS. I used Eclipse for it.

#7

jrosen - March 11, 2009 - 16:25

Please be more specific... what is not working? What errors or symptoms are you encountering?

#8

adpo - March 11, 2009 - 18:30

After patching I`ve just noticed that there is no views integration.

#9

jrosen - March 12, 2009 - 08:04

After patching, do you have the file: "jobsearch/views/job.views.inc"? This should have been created by the patch.

Also the following lines should be in your job.module:

function job_views_api() {
return array(
'api' => 2,
'path' => drupal_get_path('module', 'job') .'/views',
);

If these are there, then you should have Views 2 integration.

#10

adpo - March 12, 2009 - 18:49

Hi jrosen,
Thank you for your response. Everything is there as stated, but I still can't find new views. I don't know what I`m doing wrong.
Please find attached images.

AttachmentSize
modulepatch.GIF 90.73 KB
viewsscreen.GIF 41.23 KB

#11

stego - March 14, 2009 - 08:02

Hi. Sorry, I'm new to patching so I'm not sure how to debug this. The patch file is being run from the jobsearch module folder.

I get the following error when trying to patch the module...

patch < jobsearch.patch
patching file README.txt
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file README.txt.rej
can't find file to patch at input line 16
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nurp access/job_access.info jobsearch/access/job_access.info
|--- access/job_access.info 2009-01-17 04:08:22.000000000 -0800
|+++ jobsearch/access/job_access.info 2009-01-23 18:24:12.000000000 -0800
--------------------------
File to patch:

The README.txt.rej file contains the following...

***************
*** 1,6 ****
- $Id: README.txt,v 1.2 2009/01/02 02:49:22 kbahey Exp $

- Copyright 2007-2009 http://2bits.com

Description
-----------
--- 1,6 ----
+ $Id: README.txt,v 1.1 2007/06/24 00:23:05 kbahey Exp $

+ Copyright 2007 http://2bits.com

Description
-----------

#12

stego - March 16, 2009 - 12:46

OK I think i got it. I placed the patch file (the original file not the one updated with relative links) in the module directory and ran it with the following...

patch -p8 < jobsearch.patch

And got the following response...

missing header for unified diff at line 4 of patch
patching file access/README.txt
missing header for unified diff at line 16 of patch
patching file access/job_access.info
missing header for unified diff at line 38 of patch
patching file access/job_access.module
missing header for unified diff at line 74 of patch
patching file access/resume_access.info
missing header for unified diff at line 96 of patch
patching file access/resume_access.module
missing header for unified diff at line 133 of patch
patching file job.info
missing header for unified diff at line 154 of patch
patching file job.install
missing header for unified diff at line 218 of patch
patching file job.module
missing header for unified diff at line 891 of patch
patching file resume.info
missing header for unified diff at line 910 of patch
patching file resume.module
missing header for unified diff at line 960 of patch
patching file translations/ru.po
missing header for unified diff at line 970 of patch
patching file views/job.views.inc
missing header for unified diff at line 1149 of patch
patching file views/job.views_default.inc
missing header for unified diff at line 1240 of patch
patching file views/job_views_handler_field_applicant.inc

The files seem to have patched fine (according to the checks in reply #9 above) but the views aren't appearing in my views list.

Am I missing something?

#13

stego - March 16, 2009 - 14:26

OK well I'm a little embarrassed but thought I'd post in case it helps someone else. While I was testing the patch I kept a copy of my old module in the module folder as _jobsearch but drupal found this first and used it instead of my patched module. Removed this and the views appear.

So everything looks good apart from the 'missing header for unified diff at line...' when patching.

#14

jrosen - March 16, 2009 - 17:45

@adpo: please check the files after you have patched them as per my comment #9 in this thread. Also, after running the patch make sure you run update.php found in /admin/build/modules. You may also have to clear the Drupal cache by going to admin/settings/performance to clear the Views 2 cached views info.

#15

adpo - March 16, 2009 - 20:28

please find attached jobsearch module after patching, I'am sure that your files has been updated OK. But maybe there is something else... what I did wrong.

AttachmentSize
jobsearch.zip 23.34 KB

#16

jrosen - March 17, 2009 - 22:24

@adpo: you have the views files in "jobsearch/jobsearch/views". The views folder should be here: "jobsearch/views"

When I applied the patch, I was in a directory outside the "jobsearch" directory. Could be you were inside the "jobsearch" directory and your patch program created a new "jobsearch/jobsearch" subdirectory.

Move the "views" folder up one level, use the Drupal update.php URL, clear your Drupal cache, and you should be up and running to use the Views 2 integration. (check #14 above for details on the update.php URL and clearing your Drupal cache).

#17

adpo - March 18, 2009 - 07:42

Thank you very much. Your patch is working now.

#18

jamiechef - March 18, 2009 - 17:49

hi where do i attach this patch to do i just insert it inside the jobsearch module folder and upload

folowed by update.php

never applied one before

#19

jamesmcd - March 31, 2009 - 18:41

Please see the following for guidance on applying patches:

For Windows: http://drupal.org/node/60179

For Mac OS X: http://drupal.org/node/60818

#20

visualnotion - April 17, 2009 - 15:53

Maybe it's just me, but I can't get jchatard 's updated patch to work on Mac OS X (I followed the instructions from the handbook page).

#21

GreyHawk - April 27, 2009 - 18:48

We ran the patch, it added the views folder, but there appear to be no new views.

Can you issue a patched dev version for testing? Or export the views and make them available for us to import?

#22

jrosen - April 30, 2009 - 04:55

What patched dev version are you asking for? I have run the patch and have no problems.

Please be more specific as to what you need. I can export the views, but they won't work if the rest of the Views 2 integration code is not available because the rest of the code defines the fields, joins, and relationships that the exported views use.

Can you take a look inside the new views folder and tell me what files are inside? They should be:

  • job.views.inc
  • job.views_default.inc
  • job_views_handler_field_applicant.inc

If these files are not in there, then let me know where they ended up so I can fix the patch. But to get it working, you can move those files into the views folder that was created, if they are somewhere else.

Let me know how it goes.

#23

SocialNicheGuru - June 15, 2009 - 00:48

Was this included in the newest release? I don't see the views folder in the newest release.

When I apply the patch there are many errors. But it looks like it is only the .info files

$ patch -p0 < jobs*h
patching file access/README.txt
patching file access/job_access.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file access/job_access.info.rej
patching file access/job_access.module
patching file access/resume_access.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file access/resume_access.info.rej
patching file access/resume_access.module
patching file job.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file job.info.rej
patching file job.install
patching file job.module
patching file resume.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file resume.info.rej
patching file resume.module
patching file translations/ru.po
patching file views/job.views.inc
patching file views/job.views_default.inc
patching file views/job_views_handler_field_applicant.inc

Chris

#24

SocialNicheGuru - June 15, 2009 - 01:18

also, the views do not show up.

#25

jrosen - June 19, 2009 - 20:50

Can we get this patch rolled into the Dev version for Drupal 6.x? It seems that others are having a problem applying the patch.

#26

GreyHawk - June 22, 2009 - 11:42

#22 jrosen -- I just saw this response; sorry for the delay. I'll check and reply/update.

#27

flamingpear - June 23, 2009 - 06:07

#26 GreyHawk -- Yes that would be amazing. I've been patiently waiting and hoping for the Views 2 integration into the main branch.

#28

johnlee80 - June 23, 2009 - 08:23

Hi, I'm using Job Search now and wanted to mention something about the jobsearch.zip file above. I've been having problems seeing Job applications and decided to compare these files to the developed version (http://drupal.org/project/jobsearch).

I noticed that in the Translations folder, there is a file called ru.po. While in the developed version in the Translations folder, there is ru.po and es.po. Is this latter file suppose to be included in the jobsearch.zip package? Could this be why others are having problems too?

- john

#29

jrosen - June 24, 2009 - 19:33

@johnlee80 (#28):

The jobsearch.zip in comment #15 is not a usable patched version... he attached it so I could take a look and see why his was not working.

I will attach a working version in the near future. For now, please try to apply the patch yourself.

#30

makuyk00 - June 30, 2009 - 21:35

Any more info on the new patch?

#31

jboeger - July 1, 2009 - 23:38

Any chance somebody could wrap up the patch into new module release? I'm lost on this thread as to what to use. Thanks a TON.

#32

GreyHawk - July 2, 2009 - 03:57

#27 flamingpear -- I'm waiting for my cohort to return from vacation so I can be sure to test the right env (we have a couple testing setups); I hope to get back to it this week (before I forget what I was doing). ;)

#33

jboeger - July 3, 2009 - 20:00

I've been trying the patch and getting errors (mac terminal.)

Hoping somebody could post updated module .zip.

#34

basicmagic.net - July 5, 2009 - 16:35

hi and thanks...

please find attached the latest dev version, as of this post (6.x-1.x-dev 2009-Apr-22)-
with your patch applied, ready to be installed, simple.

tested all functions and views integration...
seems to be working fine, with no issues or errors yet.

thanks for your patch / work... i applied this for a client-
perhaps it may be of use to others as well.

vincent, in buffalo
http://basicmagic.net

AttachmentSize
jobsearch.zip 28.11 KB

#35

jrosen - July 11, 2009 - 05:54

@basicmagic.net:

Thanks for posting the merged code w/patch. I'll take a look and see that it matches my version to make sure I haven't made any changes since.

Jason

#36

Jolidog - August 29, 2009 - 00:43

subscribing...

#37

nysander - September 10, 2009 - 22:12

any progress? subscribe

#38

d0t101101 - September 25, 2009 - 00:05

Tested basicmagic.net's module (#34), and it seems to be working well for our needs - no noticeable issues. Thanks!

Really hope to see these features applied to the 6.x DEV version. I ended up going with the code above for now since custom views are a requirement, and views support seems to be broken in the current 'official' DEV version of jobsearch.

.

#39

kbahey - October 6, 2009 - 23:21
Status:reviewed & tested by the community» fixed

I committed the patch to the -dev tarball, which should be created in a couple of hours.

Please test and report any issues you find as new issues.

#40

System Message - October 20, 2009 - 23:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.