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.
Comment | File | Size | Author |
---|---|---|---|
#4 | serial_rules_support-2305067-4.patch | 1.72 KB | lolandese |
#1 | generate_serial_action.zip | 2.81 KB | lolandese |
Comments
Comment #1
lolandese CreditAttribution: lolandese commentedThe attached patch adds the rules action 'Generate a unique sequential number'. Limitations (@TODO):
As a working example to be used with the patch a Feature module is attached that:
Feel free to adapt it for an other use case or develop it further to commit.
Thanks.
Comment #2
lolandese CreditAttribution: lolandese commentedComment #3
srinivasa.r CreditAttribution: srinivasa.r commentedHi, I am trying to use you patch but I am getting the following error. Could you please advise on this?
patch < serial_rules_support-2305067-1.patch
patching file serial.module
Hunk #1 FAILED at 80.
1 out of 1 hunk FAILED -- saving rejects to file serial.module.rej
patching file serial.rules.inc
Thanks in advance.
Regards,
--
Srinivas R
Comment #4
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedRe-roll against latest dev.
Comment #5
delacosta456 CreditAttribution: delacosta456 commentedhi lolandese
Thanks for you nice idea and work..
At the time of writing i am on Panopoly distribution 1.43 + Drupal 1.54+Rules 7.x-2.x-dev(2017-Apr-20)+Serial Field 7.x-1.8Full release 2016-Aug-31
After apply the Patch, which apply correctly, On a manual node creating process, after saving the node, serial number did not generate .. when i revert the patch it started generating correctly..
When i was writing this issue i just realize that this patch is looks to be related to dev version of Serial Field... which is the one i applied the patch to ... Could this be the reason why i am getting this issue ? is there any other possible reason?
Thnaks
Comment #6
lolandese CreditAttribution: lolandese at HCL Technologies Limited commented@delacosta456: It's 3 years ago I used this patch but if I recall well a rule should be defined that indicates on what action to create a serial number. I guess that you do not have a rule defined that kicks in.
It is intended to be used with the action: 'After updating existing content'. Ideally it should be extended to the event 'After saving new content', so even the normal behaviour can be replicated (see comment #1).
Comment #7
delacosta456 CreditAttribution: delacosta456 commentedhi lolandese
Many thanks for your clarification