Skip to content

Commit

Permalink
Plans.updatePlan refined
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Feb 8, 2025
1 parent 0186b1f commit 05dcf60
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 87 deletions.
23 changes: 23 additions & 0 deletions src/version3/parameters/updatePlan.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
import {
CreateCrossProjectReleaseRequest,
CreateCustomFieldRequest,
CreateExclusionRulesRequest,
CreateIssueSourceRequest,
CreatePermissionRequest,
CreateSchedulingRequest,
} from '@jirajs/version3/models';

export interface UpdatePlan {
/** The ID of the plan. */
planId: number;
/** Whether to accept group IDs instead of group names. Group names are deprecated. */
useGroupId?: boolean;
/** The cross-project releases to include in the plan. */
crossProjectReleases?: CreateCrossProjectReleaseRequest[];
/** The custom fields for the plan. */
customFields?: CreateCustomFieldRequest[];
exclusionRules?: CreateExclusionRulesRequest;
/** The issue sources to include in the plan. */
issueSources?: CreateIssueSourceRequest[];
/** The account ID of the plan lead. */
leadAccountId?: string;
/** The plan name. */
name?: string;
/** The permissions for the plan. */
permissions?: CreatePermissionRequest[];
scheduling?: CreateSchedulingRequest;
}
97 changes: 10 additions & 87 deletions src/version3/plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,49 +110,6 @@ export class Plans {
/**
* Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902).
*
* - Name
* - LeadAccountId
* - Scheduling
*
* - Estimation with StoryPoints, Days or Hours as possible values
* - StartDate
*
* - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values
* - DateCustomFieldId
* - EndDate
*
* - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values
* - DateCustomFieldId
* - InferredDates with None, SprintDates or ReleaseDates as possible values
* - Dependencies with Sequential or Concurrent as possible values
* - IssueSources
*
* - Type with Board, Project or Filter as possible values
* - Value
* - ExclusionRules
*
* - NumberOfDaysToShowCompletedIssues
* - IssueIds
* - WorkStatusIds
* - WorkStatusCategoryIds
* - IssueTypeIds
* - ReleaseIds
* - CrossProjectReleases
*
* - Name
* - ReleaseIds
* - CustomFields
*
* - CustomFieldId
* - Filter
* - Permissions
*
* - Type with View or Edit as possible values
* - Holder
*
* - Type with Group or AccountId as possible values
* - Value
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:**
* _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
*
Expand All @@ -163,49 +120,6 @@ export class Plans {
/**
* Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902).
*
* - Name
* - LeadAccountId
* - Scheduling
*
* - Estimation with StoryPoints, Days or Hours as possible values
* - StartDate
*
* - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values
* - DateCustomFieldId
* - EndDate
*
* - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values
* - DateCustomFieldId
* - InferredDates with None, SprintDates or ReleaseDates as possible values
* - Dependencies with Sequential or Concurrent as possible values
* - IssueSources
*
* - Type with Board, Project or Filter as possible values
* - Value
* - ExclusionRules
*
* - NumberOfDaysToShowCompletedIssues
* - IssueIds
* - WorkStatusIds
* - WorkStatusCategoryIds
* - IssueTypeIds
* - ReleaseIds
* - CrossProjectReleases
*
* - Name
* - ReleaseIds
* - CustomFields
*
* - CustomFieldId
* - Filter
* - Permissions
*
* - Type with View or Edit as possible values
* - Holder
*
* - Type with Group or AccountId as possible values
* - Value
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:**
* _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
*
Expand All @@ -220,7 +134,16 @@ export class Plans {
params: {
useGroupId: parameters.useGroupId,
},
// todo
data: {
crossProjectReleases: parameters.crossProjectReleases,
customFields: parameters.customFields,
exclusionRules: parameters.exclusionRules,
issueSources: parameters.issueSources,
leadAccountId: parameters.leadAccountId,
name: parameters.name,
permissions: parameters.permissions,
scheduling: parameters.scheduling,
},
};

return this.client.sendRequest(config, callback);
Expand Down

0 comments on commit 05dcf60

Please sign in to comment.