Skip to content

Commit 2cfb54c

Browse files
committed
feat: support more jira projects (RHELMISC, FC)
1 parent 1f996c6 commit 2cfb54c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
Simple CLI tool that provides an interactive interface to quickly set priority, severity and story points for your JIRA issues. No need to open the JIRA web interface.
2525

26-
StoryPointer uses base JQL query to fetch issues that are not closed and have no story points or priority set - `Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed`. The query can be customized using the CLI command options or by setting ENV variables.
26+
StoryPointer uses base JQL query to fetch issues that are not closed and have no story points or priority set - `Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed`. The query can be customized using the CLI command options or by setting ENV variables.
2727

2828
## Usage
2929

@@ -111,7 +111,7 @@ Size all issues of the `curl` component:
111111
storypointer -c curl
112112
113113
JIRA Version: 9.12.10
114-
JQL: Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = curl ORDER BY id DESC
114+
JQL: Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = curl ORDER BY id DESC
115115
5 issues are waiting to be sized, prioritized, or set severity.
116116
117117
🐛 RHEL-1234 - In Progress - Assignee

src/jira.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class Jira {
1212
severity: 'customfield_12316142',
1313
};
1414
readonly baseJQL =
15-
'Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed';
15+
'Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed';
1616
JQL = '';
1717

1818
constructor(

test/unit/jira.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe('Jira functions', () => {
9393
it('can be instantiated', () => {
9494
expect(jira).toBeInstanceOf(Jira);
9595
expect(jira.baseJQL).toMatchInlineSnapshot(
96-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed"`
96+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed"`
9797
);
9898
});
9999

@@ -173,7 +173,7 @@ describe('Jira functions', () => {
173173
undefined
174174
);
175175
expect(jira.JQL).toMatchInlineSnapshot(
176-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed ORDER BY id DESC"`
176+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed ORDER BY id DESC"`
177177
);
178178
expect(mocks.searchForIssuesUsingJqlPost).toHaveBeenCalledWith({
179179
fields: [
@@ -186,7 +186,7 @@ describe('Jira functions', () => {
186186
'customfield_12310243',
187187
'priority',
188188
],
189-
jql: 'Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed ORDER BY id DESC',
189+
jql: 'Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed ORDER BY id DESC',
190190
});
191191
expect(issues).toMatchInlineSnapshot(`
192192
[
@@ -239,7 +239,7 @@ describe('Jira functions', () => {
239239
undefined
240240
);
241241
expect(jira.JQL).toMatchInlineSnapshot(
242-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = "component" ORDER BY id DESC"`
242+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = "component" ORDER BY id DESC"`
243243
);
244244

245245
issues = await jira.getIssues(
@@ -250,7 +250,7 @@ describe('Jira functions', () => {
250250
undefined
251251
);
252252
expect(jira.JQL).toMatchInlineSnapshot(
253-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = "component" AND assignee = "assignee" ORDER BY id DESC"`
253+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = "component" AND assignee = "assignee" ORDER BY id DESC"`
254254
);
255255

256256
issues = await jira.getIssues(
@@ -261,7 +261,7 @@ describe('Jira functions', () => {
261261
'team'
262262
);
263263
expect(jira.JQL).toMatchInlineSnapshot(
264-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = "component" AND assignee = "assignee" AND developer = "developer" AND AssignedTeam = "team" ORDER BY id DESC"`
264+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND component = "component" AND assignee = "assignee" AND developer = "developer" AND AssignedTeam = "team" ORDER BY id DESC"`
265265
);
266266

267267
issues = await jira.getIssues(
@@ -272,7 +272,7 @@ describe('Jira functions', () => {
272272
undefined
273273
);
274274
expect(jira.JQL).toMatchInlineSnapshot(
275-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND customJQL ORDER BY id DESC"`
275+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND customJQL ORDER BY id DESC"`
276276
);
277277

278278
issues = await jira.getIssues(
@@ -283,7 +283,7 @@ describe('Jira functions', () => {
283283
'!team'
284284
);
285285
expect(jira.JQL).toMatchInlineSnapshot(
286-
`"Project = RHEL AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND customJQL AND assignee != "assignee" AND developer = "developer" AND AssignedTeam != "team" ORDER BY id DESC"`
286+
`"Project in (RHEL, "RHEL Miscellaneous", Fedora) AND (type in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY) OR type not in (Story, Task) AND ("Story Points" is EMPTY OR priority is EMPTY OR Severity is EMPTY)) AND status != Closed AND customJQL AND assignee != "assignee" AND developer = "developer" AND AssignedTeam != "team" ORDER BY id DESC"`
287287
);
288288
});
289289

0 commit comments

Comments
 (0)