Skip to main content

KI-149

PP_PlanTeamMemberQueueSchedulable batch job does not pick up new plan team members during scheduled runs

Created date

11/10/2025

Updated date

11/10/2025

Status

Done

Related work item

MPP-3281

Description

The PP_PlanTeamMemberQueueSchedulable batch job is a schedulable job that users can run to retroactively add plan team members to existing plan documents as document collaborators. When it is run manually or when it runs for the first time in a scheduled job, it works as expected. However, if it runs again after the first scheduled job, it does not pick up the new or updated list of plan team members to add to the plan documents and instead reuses the same list of plan team members from the first scheduled run. This means that it always adds the same users to the documents for every subsequent run in a scheduled job.

Affects version(s)

Spring '25

Impacted capabilities

N/A

Steps to reproduce

  1. Create a publication plan.

  2. Add a document to the publication plan.

  3. Add plan team members to the publication plan. For example, add User A and User B.

  4. Run the following code block in Apex Anonymous. This will schedule the PP_PlanTeamMemberQueueSchedulable batch job to run every 10 minutes.

    System.schedule('PP_PlanTeamMemberQueueSchedulable 1', '0 0 * * * ?', new mvn.PP_PlanTeamMemberQueueSchedulable(0, 400));
    System.schedule('PP_PlanTeamMemberQueueSchedulable 2', '0 10 * * * ?', new mvn.PP_PlanTeamMemberQueueSchedulable(0, 400));
    System.schedule('PP_PlanTeamMemberQueueSchedulable 3', '0 20 * * * ?', new mvn.PP_PlanTeamMemberQueueSchedulable(0, 400));
    System.schedule('PP_PlanTeamMemberQueueSchedulable 4', '0 30 * * * ?', new mvn.PP_PlanTeamMemberQueueSchedulable(0, 400));
    System.schedule('PP_PlanTeamMemberQueueSchedulable 5', '0 40 * * * ?', new mvn.PP_PlanTeamMemberQueueSchedulable(0, 400));
    System.schedule('PP_PlanTeamMemberQueueSchedulable 6', '0 50 * * * ?', new mvn.PP_PlanTeamMemberQueueSchedulable(0, 400));
  5. After 10 minutes, check the list of document collaborators on the document. User A and User B should be added to the document.

  6. Add more plan team members to the publication plan. For example, add User C and User D.

  7. After another 10 minutes, check the list of document collaborators on the document again. User C and User D should appear along with User A and User B, but they do not; User A and User B remain the only document collaborators on the document because User C and User D did not get picked up and added by the batch job.

Workaround

This issue is resolved in the Fall '25 release. However, if you do not plan to immediately update your current Scientific Publications Cloud version to the Fall '25 release, you can wrap the PP_PlanTeamMemberQueueSchedulable batch job in a custom schedulable class as follows:

public class PlanTeamMemberSchedulable implements Schedulable {
    public void execute(SchedulableContext context) {
        new mvn.PP_PlanTeamMemberQueueSchedulable(0, 5).execute(null);
    }
}

You can then schedule and run this custom class instead of the PP_PlanTeamMemberQueueSchedulable batch job.

Fix version

Fall '25

Resolution notes

N/A