Skip to content

Bug with fields model fixed #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 53 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
"@types/node": "^15.0.2",
"@types/oauth": "^0.9.1",
"@types/sinon": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"dotenv": "^9.0.0",
"eslint": "^7.25.0",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"dotenv": "^9.0.2",
"eslint": "^7.26.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-import": "^2.22.1",
Expand Down
2 changes: 1 addition & 1 deletion src/agile/models/issueBean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,5 @@ export interface IssueBean {
};
/** The versions of each field on the issue. */
versionedRepresentations?: {};
fields?: {};
fields?: Record<string, any>; // TODO clarify
}
62 changes: 55 additions & 7 deletions src/version2/models/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,70 @@ import { Priority } from './priority';
import { UserDetails } from './userDetails';
import { TimeTrackingDetails } from './timeTrackingDetails';
import { IssueTypeDetails } from './issueTypeDetails';
import { Watchers } from './watchers';
import { Component } from './component';
import { Attachment } from './attachment';
import { User } from './user';
import { IssueBean } from './issueBean';
import { Comment } from './comment';
import { Votes } from './votes';
import { Worklog } from './worklog';

/**
* Key fields from the linked issue. */
* Key fields from the linked issue.
*/
export interface Fields {
[key: string]: any;

/** The summary description of the linked issue. */
summary?: string;
summary: string;
/** The status of the linked issue. */
status?: StatusDetails[];
status: StatusDetails;
/** The priority of the linked issue. */
priority?: Priority[];
priority: Priority;
/** The assignee of the linked issue. */
assignee?: UserDetails[];
assignee: UserDetails;
/** The time tracking of the linked issue. */
timetracking?: TimeTrackingDetails[];
timetracking: TimeTrackingDetails;
/** The type of the linked issue. */
issuetype?: IssueTypeDetails;
/** The type of the linked issue. */
issueType?: IssueTypeDetails[];
issueType?: IssueTypeDetails;

timespent?: any;
fixVersions?: string[];
aggregatetimespent?: any;
resolution?: any;
resolutiondate?: any;
workratio?: number;
issuerestriction?: {
issuerestrictions: any;
shouldDisplay: boolean;
};
lastViewed?: any;
watches: Watchers;
created: string;
labels: string[];
updated: string;
components: Component[];
timeoriginalestimate?: any;
description?: string;
attachment: Attachment[];
creator: User;
subtasks: IssueBean[];
reporter: User;
comment: {
comments: Comment[];
self: string;
maxResults: number;
total: number;
startAt: number;
};
votes: Votes;
worklog: {
startAt: number;
maxResults: number;
total: number;
worklogs: Worklog[];
};
}
3 changes: 2 additions & 1 deletion src/version2/models/issueBean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Operations } from './operations';
import { IssueUpdateMetadata } from './issueUpdateMetadata';
import { PageOfChangelogs } from './pageOfChangelogs';
import { IncludedFields } from './includedFields';
import { Fields } from './fields';

export interface IssueBean {
/** Expand options that include additional issue details in the response. */
Expand Down Expand Up @@ -32,5 +33,5 @@ export interface IssueBean {
/** The versions of each field on the issue. */
versionedRepresentations?: {};
fieldsToInclude?: IncludedFields;
fields?: {};
fields: Fields;
}
Loading