Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
i started porting this module to drupal7 using the coder module +
manual fixing. I used the 6.x-2.x-dev version as basis.
I made a short test with 2 resources and 2 resource module enabled
contenttypes, 1 using datetimefield the other date field. it seems to work but
needs more testing. if this gets approved by the community and deviantintegral the maintainer,
a release for drupal 7 could be made available. The converted module is in the attached zip.
Please try it so we can have a release for drupal 7, thanks.
Comment | File | Size | Author |
---|---|---|---|
#12 | 976522.12-resource_conflict_entityreference_taxonomy.patch | 52.26 KB | ohthehugemanatee |
#11 | resource_conflict_entityreference.patch | 6.77 KB | ohthehugemanatee |
#11 | resource_conflict_taxonomy.patch | 2.03 KB | ohthehugemanatee |
#10 | 976522.10_resource-conflict-D7-upgrade.patch | 705 bytes | Anonymous (not verified) |
#6 | capturegitapplypatch.png | 44.83 KB | agill |
Comments
Comment #1
deviantintegral CreditAttribution: deviantintegral commentedThanks for the work. Here's my feedback:
This is actually pretty close to being good enough for a 7.x-1.x-dev branch (though I haven't actually tested the code). What needs to happen before that:
Comment #2
agill CreditAttribution: agill commentedI just noticed that the References module now maintains the node_reference code of the cck project for
drupal7 until a more general solution like Relation is actually made usable. thats whats written on the
projectsite of References.
So i guess its a good idea to wait a little longer to see what module to use for references...
When these questions are solved i will post a corrected version of the Resource Conflict module
for drupal 7 again.
Comment #3
agill CreditAttribution: agill commentedHow about this version? I cleaned it up.
It does not have update code from 6.x to 7.x, but it would be nice if you could
make a 7.x-1.x dev branch of the attached zip.
Thanks
Andreas
Comment #4
deviantintegral CreditAttribution: deviantintegral commentedComment #5
deviantintegral CreditAttribution: deviantintegral commentedI've created a 7.x-2.x branch, but haven't put in any commits yet. Here's a git format-patch against that branch. I split your changes into three different commits and set the author, and then added coder style fixes on top. In the future, please provide the output of git format-patch instead of zip files.
If this patch looks good, let me know and I'll commit them to the branch.
Comment #6
agill CreditAttribution: agill commentedHello,
i applied the patch. I got two warnings about 2 lines added whitespace.
See attached screenshot. But the rest applied successfully, and the module
seems to work. I don´t know if i did everything right, still need to get used to git.
because of that i added the screenshot.
Comment #7
artatac CreditAttribution: artatac commentedI have created a content type resource and another with a mandatory date field with from and to required. I created a node reference field linked to resource (projector1, projector2, projector3). It works fine when booking but ignores any conflicts. If you need more details of access please let me know
Comment #8
WilliamV CreditAttribution: WilliamV commentedIs it possible to put reservations of resources on hold and provide later on dis/approval?
Grtz.
Comment #9
paulgemini CreditAttribution: paulgemini commentedsubbing
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedThis worked for me after I removed the cck dependency from the .info file.
Only tested once so far - I created a content type called "booking" with a date field and a node reference to a "room" content type. I used the references module, although looks like Entity Reference might be replacing that as the way to go for referencing in the future.
As probably guessed I'm trying to create a meeting room booking system, doesn't seem to be any particular "best" way of doing this - last time I did similar was many years ago before my Drupal days and I used the Meeting Room Booking System (MRBS) on sourceforge. Would appreciate any pointers, but liking the look of this so far!
Comment #11
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedI patched the upgrade to D7, fixed the .info file, and it worked fine. But as stevepurkiss said, most people are using Entity Reference now. It's certainly a lot more flexible! I've attached two things here.
* patch from the D7 version of the module, to change from reference module to entityreference
* further patch to add Taxonomy term support on top of that
For anyone wanting to use these patches, the order is:
1) download the dev version of the module
2) apply patch from #5
3) apply entityreference patch
4) apply taxonomy patch (optional)
I'm not using the global entity items right yet... still hunting for the EID and title, specifically. This results in the occasional fatal when it can't find the property I'm looking for. Entity API can take care of this, so I'll tidy up the code and provide a better version tomorrow... but I thought I'd post my results here for now.
BTW, it looks like this module is abandoned. I'm happy to take it over. What I see as the future:
* removing event module cruft
* EntityReference integration
* configurable error messages
* Rules integration, so you can choose whether a conflict should throw an error on the form, fire a Rules action, or both
Comment #12
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedSimpler patch here. This patch applies to 7.x-2.x.dev (download from http://drupal.org/node/1144872 ) to make the following changes:
* use Entityreference instead of Reference
* permit taxonomy terms as a unique bookable object as well
* Remove old "event module" stuff which doesn't apply to D7
Comment #13
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedCross posting: I rebuilt the module using Rules, so you can easily customize your conflict behaviors. Works great in D7, but I could use more testers. See http://drupal.org/node/177009/git-instructions/rules for instructions on how to download the Rules branch.
Comment #14
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedReleased the dev version of 7.x-3.x today, completely rebuilt using Rules. Please note when updating that there is no upgrade path for conflict resources at present. Any content types you already had set for conflict detection will stay set, and it will remember the date field specified. But conflict resources will have to be redone in Rules.