Skip to content

Commit

Permalink
Merge pull request #83 from bitovi/child-query
Browse files Browse the repository at this point in the history
Removes
  • Loading branch information
justinbmeyer authored Sep 27, 2024
2 parents f3c1437 + 2e7845a commit 3b7b022
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 107 deletions.
188 changes: 94 additions & 94 deletions public/dist/main-PIvIBOjY.js → public/dist/main-WcgFLO3m.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/main.js

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

2 changes: 1 addition & 1 deletion public/dist/production.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion public/jira-auto-scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class JiraAutoScheduler extends StacheElement {
issueJQL:bind="this.issueJQL"
loadChildren:bind="this.loadChildren"
limitIssues:bind="this.limitIssues"
childJQL:bind="this.childJQL"
/>
</details>
Expand Down Expand Up @@ -184,10 +186,11 @@ class JiraAutoScheduler extends StacheElement {
}
},
issueJQL: saveJSONToUrlAndToLocalStorage("issueJQL", "issueType = Epic and statusCategory != Done"),
childJQL: saveJSONToUrl("childJQL", "", String, {parse: x => ""+x, stringify: x => ""+x}),
loadChildren: saveJSONToUrl("loadChildren", false, Boolean, booleanParsing),
dateThresholds: saveJSONToUrl("weight",55,type.maybeConvert(Number)),
startDate: saveJSONToUrl("startDate",nowUTC(),type.maybeConvert(Date)),
limitIssues: saveJSONToUrl("loadChildren", true, Boolean, booleanParsing),
limitIssues: saveJSONToUrl("limitIssues", true, Boolean, booleanParsing),
//rawIssues: type.Any,
workItems: type.Any,
tooltip: HTMLElement,
Expand Down Expand Up @@ -234,6 +237,7 @@ class JiraAutoScheduler extends StacheElement {

const issuesPromise = loadIssues({
jql: this.issueJQL,//this.jql,
childJQL: this.childJQL ? " and "+this.childJQL : "",
fields: this.config.issueFields, // LABELS_KEY, STATUS_KEY ]
limit: this.limitIssues ? 100 : Infinity
});
Expand All @@ -242,6 +246,7 @@ class JiraAutoScheduler extends StacheElement {
issuesPromise, serverInfoPromise
]).then(([issues, serverInfo]) => {
const csv = toCVSFormatAndAddWorkingBusinessDays(issues, serverInfo);
//console.log(csv);
return csv;
})
}
Expand Down
11 changes: 9 additions & 2 deletions public/jira-configure-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ class JiraConfigureCSV extends StacheElement {
{{/ if }}
<div class="flex justify-between mt-1">
<p class="text-xs"><input type='checkbox'
class='self-start align-middle' checked:bind='this.loadChildren'/> <span class="align-middle">Load all children of JQL specified issues</span>
<p class="text-xs">
<input type='checkbox'
class='self-start align-middle' checked:bind='this.loadChildren'/>
<span class="align-middle">
Load children.
{{# if(this.loadChildren) }}
Optional children JQL filters: <input type='text' class="form-border p-1 h-5" value:bind="this.childJQL"/>
{{/ if }}
</span>
</p>
{{# if(this.rawIssuesPromise.isResolved) }}
Expand Down
2 changes: 1 addition & 1 deletion public/jira-oidc-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function JiraOIDCHelpers({

const batchedResponses = issuesToQuery.map( issues => {
const keys = issues.map( issue => issue.key);
const jql = `parent in (${keys.join(", ")})`;
const jql = `parent in (${keys.join(", ")}) ${params.childJQL || ""}`;
return rootMethod({
...params,
jql
Expand Down
10 changes: 8 additions & 2 deletions public/schedule-prepare-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,15 @@ export function prepareIssues(issuesSource, {
return {preparedIssues: interestingEpics, issuesByKey: issueByKey, workByTeams};
}

const removeDone = makeFilterByPropertyNotEqualToOneOfValues("Status", ["Done"]);
//makeFilterByPropertyNotEqualToOneOfValues("Status", ["Done"])

const removeDoneStatusCategory = function({issue}){
return issue?.fields?.Status?.statusCategory?.name !== "Done"
}

;
function issueFilterDefault(issue){
return removeDone(issue);
return removeDoneStatusCategory(issue);
}

function getDaysOfWork(usedEstimate, extraPoints, pointsPerDay){
Expand Down
3 changes: 2 additions & 1 deletion public/shared/issue-cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function toCVSFormat(issues, serverInfo){
[PRODUCT_TARGET_RELEASE_KEY]: issue.fields[PRODUCT_TARGET_RELEASE_KEY]?.[0],
[PARENT_LINK_KEY]: issue.fields[PARENT_LINK_KEY]?.data?.key,
[STATUS_KEY]: issue.fields[STATUS_KEY]?.name,
linkedIssues: {blocks}
linkedIssues: {blocks},
issue
}
})
}
Expand Down

0 comments on commit 3b7b022

Please sign in to comment.