Skip to content

Commit

Permalink
Merge pull request #174 from bitovi/rollback-teams
Browse files Browse the repository at this point in the history
rolling back teams to make sure things work
  • Loading branch information
justinbmeyer authored Oct 8, 2024
2 parents f9728c7 + b3bb8de commit 9630be2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 124 deletions.
5 changes: 4 additions & 1 deletion public/stateful-data/jira-data-requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ export function getRawIssues({isLoggedIn, loadChildren, jiraHelpers, jql, fields
childJQL: childJQL ? " and "+childJQL : "",
fields: fieldsToLoad,
expand: ["changelog"]
}, progressUpdate);
}, progressUpdate).then((raw)=>{
console.log("rawed food2", raw);
return raw;
});
}


Expand Down
14 changes: 10 additions & 4 deletions public/timeline-configuration/state-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export function configurationPromise({ serverInfoPromise, teamConfigurationPromi
// we will give pending until we have both promises

const info = resolve(serverInfoPromise),
team = resolve(teamConfigurationPromise),
normalizeOptions = resolve(normalizeOptionsObservable);
if (!info || !team || !normalizeOptions) {
team = resolve(teamConfigurationPromise)//;,
//normalizeOptions = resolve(normalizeOptionsObservable);
if (!info || !team /*|| !normalizeOptions*/) {
return new Promise(() => {});
}

Expand All @@ -94,6 +94,12 @@ export function configurationPromise({ serverInfoPromise, teamConfigurationPromi
*/
([serverInfo, teamData]) => {
return {
getConfidence({fields}){
return fields.Confidence;
},
getStoryPointsMedian({fields}) {
return fields["Story points median"]
},
getUrl({ key }) {
return serverInfo.baseUrl + "/browse/" + key;
},
Expand All @@ -106,7 +112,7 @@ export function configurationPromise({ serverInfoPromise, teamConfigurationPromi
getParallelWorkLimit(team) {
return teamData.getTracksForTeam(team);
},
...(normalizeOptions ?? {}),
//...(normalizeOptions ?? {}),
};
}
);
Expand Down
127 changes: 8 additions & 119 deletions public/timeline-configuration/timeline-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { saveJSONToUrl, updateUrlParam } from "../shared/state-storage.js";
// getImpliedTimingCalculations,
// } from "../prepare-issues/date-data.js";

/*
import { createRoot } from "react-dom/client";
import { createElement } from "react";
import TeamConfigure from "../react/Configure/Teams/index";
*/

import {
rawIssuesRequestData,
Expand Down Expand Up @@ -147,7 +149,7 @@ export class TimelineConfiguration extends StacheElement {
<div class="{{^ eq(this.showSettings, "TEAMS")}}hidden{{/}}">
<div>${GOBACK_BUTTON}</div>
<div> <div id="team-configuration"></div></div>
<div> <div id="team-configuration">Coming Soon</div></div>
</div>
Expand Down Expand Up @@ -194,6 +196,7 @@ export class TimelineConfiguration extends StacheElement {
return configurationPromise({
teamConfigurationPromise: this.teamConfigurationPromise,
serverInfoPromise: this.serverInfoPromise,
// normalizeOptionsObservable: value.from(this.normalizeOptions),
});
},
configuration: {
Expand Down Expand Up @@ -230,128 +233,13 @@ export class TimelineConfiguration extends StacheElement {
},
goBack() {
this.showSettings = "";
},
}

// VALUES DERIVING FROM THE `jql`
rawIssuesRequestData: {
value({ listenTo, resolve }) {
return rawIssuesRequestData(
{
jql: value.from(this, "jql"),
childJQL: value.from(this, "childJQL"),
loadChildren: value.from(this, "loadChildren"),
isLoggedIn: value.from(this, "isLoggedIn"),
jiraHelpers: this.jiraHelpers,
},
{ listenTo, resolve }
);
},
},
get serverInfoPromise() {
return serverInfoPromise({ jiraHelpers: this.jiraHelpers, isLoggedIn: value.from(this, "isLoggedIn") });
},
get configurationPromise() {
return configurationPromise({
teamConfigurationPromise: this.teamConfigurationPromise,
serverInfoPromise: this.serverInfoPromise,
normalizeOptionsObservable: value.from(this.normalizeOptions),
});
},
configuration: {
async() {
return this.configurationPromise;
},
},
derivedIssuesRequestData: {
value({ listenTo, resolve }) {
return derivedIssuesRequestData(
{
rawIssuesRequestData: value.from(this, "rawIssuesRequestData"),
configurationPromise: value.from(this, "configurationPromise"),
},
{ listenTo, resolve }
);
},
},
get derivedIssuesPromise() {
return this.derivedIssuesRequestData.issuesPromise;
},
derivedIssues: {
async() {
return this.derivedIssuesRequestData.issuesPromise;
},
},
// PROPERTIES DERIVING FROM `derivedIssues`
get statuses() {
if (this.derivedIssues) {
return allStatusesSorted(this.derivedIssues);
} else {
return [];
}
},

/*
allTimingCalculationOptions: {
async(resolve) {
if(this.derivedIssuesRequestData.issuesPromise) {
return this.derivedIssuesRequestData.issuesPromise.then( issues => {
return allTimingCalculationOptions(issues);
})
}
}
},
// PROPERTIES only needing primaryIssue type and what it depends on
// looks like [{type: "initiative", calculation: "children-only"}, ...]
// in the URL like ?timingCalculations=initiative:children-only,epic:self
get impliedTimingCalculations(){
if(this.primaryIssueType) {
return getImpliedTimingCalculations(this.primaryIssueType,
this.allTimingCalculationOptions.map,
this.timingCalculations);
}
},
// PROPERTIES from having a primaryIssueType and timingCalculations
// used to get the name of the secondary issue type
get timingCalculationMethods() {
if(this.primaryIssueType) {
return this.impliedTimingCalculations
.map( (calc) => calc.calculation)
}
},
get timingLevels(){
if(this.primaryIssueType) {
return getTimingLevels(this.allTimingCalculationOptions.map, this.primaryIssueType, this.timingCalculations);
}
},
get rollupTimingLevelsAndCalculations(){
if(this.impliedTimingCalculations) {
const impliedCalculations = this.impliedTimingCalculations;
const primaryIssueType = this.primaryIssueType;
const primaryIssueHierarchy = this.allTimingCalculationOptions.map[this.primaryIssueType].hierarchyLevel;
const rollupCalculations = [];
for( let i = 0; i < impliedCalculations.length + 1; i++) {
rollupCalculations.push({
type: i === 0 ? primaryIssueType : impliedCalculations[i-1].type,
hierarchyLevel: i === 0 ? primaryIssueHierarchy : impliedCalculations[i-1].hierarchyLevel,
calculation: i >= impliedCalculations.length ? "parentOnly" : impliedCalculations[i].calculation
})
}
return rollupCalculations;
}
},
*/
// dependent on primary issue type

};
// HOOKS
connectedCallback() {
/*
createRoot(document.getElementById("team-configuration")).render(
createElement(TeamConfigure, {
storage: this.storage,
Expand All @@ -364,6 +252,7 @@ export class TimelineConfiguration extends StacheElement {
},
})
);
*/
}
connected() {}
// METHODS
Expand Down
1 change: 1 addition & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import babel from "@rollup/plugin-babel";
const warn = {
onwarn(warning, warn) {
// ignores any 'use client' directive warnings

if (warning.code === "MODULE_LEVEL_DIRECTIVE") {
return;
}
Expand Down

0 comments on commit 9630be2

Please sign in to comment.