When creating content for a test site using Devel Generate, it would be really helpful to have the scheduler publish_on and unpublish_on dates pre-filled, to allow quicker manual testing. Only content types enabled for the specific scheduler actions would have the appropriate date filled in. There should be some way for admins/developers to specify how many nodes get a date.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Here are a couple of screen shots. The first shows the top of the devel form with the content-type table extended with a new column displaying the scheduler settings.

devel generate table

The second shows the bottom of the form, where the user can input the percentage of nodes to get the date added. 0 will do no dates, 100 will add a date for all nodes. Any percentage between will be compared with a random number betwwen 1-100 to decide if the date is added.

devel generate fields

Patch is attached but there are no tests for this specific new code.

jonathan1055’s picture

I have now written tests to cover this new functionality.

Status: Needs review » Needs work

The last submitted patch, 3: 2890778-3.dates_for_devel_generate_with_tests.patch, failed testing. View results

jonathan1055’s picture

Status: Needs work » Needs review
FileSize
12.97 KB

The devel_generate module was not available. Added the following to .info

test_dependencies:
  - devel:devel_generate

I am guessing the project is 'devel' and the module is 'devel_generate'. Let's see ...

Status: Needs review » Needs work

The last submitted patch, 5: 2890778-5.dates_for_devel_generate_with_tests.patch, failed testing. View results

jonathan1055’s picture

So, according to the outcome of #2692407: Test_dependencies are downloaded before applying patches, rather than after the main dependencies and test dependencies are not re-evaluated after a patch is applied, so we cannot add dependencies via a patch. Needs to be committed to a branch. That's not good as I cannot test if the dependency syntax is correct before committing the change.

jonathan1055’s picture

jonathan1055’s picture

Status: Needs work » Needs review
FileSize
12.66 KB

Now that I have committed the test_dependency changes I can see the following in the test log

DCI_AdditionalRepositories=git,git://git.drupal.org/project/scheduler.git,8.x-1.x,modules/scheduler,1;git,git://git.drupal.org/project/rules.git,8.x-3.0-alpha3,modules/rules,1;git,git://git.drupal.org/project/typed_data.git,8.x-1.0-alpha1,modules/typed_data,1;git,git://git.drupal.org/project/devel.git,8.x-1.0-rc2,modules/devel,1;

so it looks like devel should be available now.

  • jonathan1055 committed 0225506 on 8.x-1.x
    Issue #2890778 by jonathan1055: Populate the scheduler date fields for...
jonathan1055’s picture

Status: Needs review » Fixed

New tests pass :-)
Committed and completed. I have wanted this addition in my own test/dev sites for a while. Hope it helps others too.

Status: Fixed » Closed (fixed)

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

jonathan1055’s picture

Assigned: jonathan1055 » Unassigned

Unassigning.