Skip to content

Commit

Permalink
Merge pull request #32 from bitovi/timing-hide-unknown
Browse files Browse the repository at this point in the history
hide unknown initiatives and docs on timing
  • Loading branch information
justinbmeyer authored Oct 25, 2023
2 parents de72bb6 + ab4ec42 commit b488105
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 9 deletions.
7 changes: 7 additions & 0 deletions public/css/primitives.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ h1 {
padding: 0px;
margin: 0px;
}


timeline-use code {
background-color: var(--gray-100-color);
padding: var(--space-2px);
border-radius: 2px;
}
13 changes: 13 additions & 0 deletions public/prepare-issues/prepare-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ import { howMuchHasDueDateMovedForwardChangedSince,
import {issues as rollbackIssues} from "../rollback/rollback.js";
//import { ObservableObject, value } from "//unpkg.com/can@6/core.mjs";

export function partition(arr, predicate) {
let passed = [];
let failed = [];

for (const item of arr) {
if (predicate(item)) {
passed.push(item);
} else {
failed.push(item);
}
}

return { passed, failed };
};

function toCVSFormat(issues, serverInfo) {
return issues.map(issue => {
Expand Down
2 changes: 1 addition & 1 deletion public/semver-releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function(unsortedReleases){
release: release,
shortName: shortReleaseNames[index],
version: cleanedRelease(release),
shortVersion: "M" + partialReleaseName(release),
shortVersion: partialReleaseName(release),

};
})
Expand Down
38 changes: 31 additions & 7 deletions public/timeline-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ export class TimelineReport extends StacheElement {
class='self-start' checked:bind='this.sortByDueDate'/>
<p class="m-0">Instead of ordering initiatives based on the order defined in the JQL,
sort initiatives by their last epic's due date.
</p>
<label class='font-bold'>Hide Unknown Initiatives</label>
<input type='checkbox'
class='self-start' checked:bind='this.hideUnknownInitiatives'/>
<p class="m-0">Hide initiatives whose timing can't be determined.
</p>
<label class='font-bold'>Show Releases</label>
Expand Down Expand Up @@ -128,15 +134,15 @@ export class TimelineReport extends StacheElement {
<div class="my-2 p-2 h-780 border-solid-1px-slate-900 border-box block overflow-hidden color-bg-white drop-shadow-md">Enter a JQL above.</div>
{{ /if }}
{{# if(this.rawIssuesPromise.value) }}
{{# and(this.rawIssuesPromise.value, this.releases) }}
<steerco-timeline
class='my-2 border-solid-1px-slate-900 border-box block overflow-hidden color-bg-white drop-shadow-md'
releases:from="this.releases"
initiatives:from="this.initiativesWithAStartAndEndDate"
breakOutTimings:from="this.breakOutTimings"
showReleasesInTimeline:from="this.showReleasesInTimeline"
/>
{{/ if }}
{{/ and }}
{{# if(this.rawIssuesPromise.isPending) }}
<div class="my-2 p-2 h-780 border-solid-1px-slate-900 border-box block overflow-hidden color-bg-white drop-shadow-md">Loading ...</div>
{{/ if }}
Expand Down Expand Up @@ -213,6 +219,7 @@ export class TimelineReport extends StacheElement {
hideInitiativesInIdea: saveJSONToUrl("hideInitiativesInIdea", false, Boolean, booleanParsing),
showReleasesInTimeline: saveJSONToUrl("showReleasesInTimeline", false, Boolean, booleanParsing),
sortByDueDate: saveJSONToUrl("sortByDueDate", false, Boolean, booleanParsing),
hideUnknownInitiatives: saveJSONToUrl("hideUnknownInitiatives", false, Boolean, booleanParsing),
jql: saveJSONToUrl("jql", "issueType in (Initiative, Epic) order by Rank", String, {parse: x => ""+x, stringify: x => ""+x}),
mode: {
type: String,
Expand Down Expand Up @@ -314,17 +321,34 @@ export class TimelineReport extends StacheElement {

const filteredInitiatives = filterOutInitiativeStatuses( this.rawIssues, initiativeStatusesToRemove )

return releasesAndInitiativesWithPriorTiming(filteredInitiatives,
const {releases, initiatives} = releasesAndInitiativesWithPriorTiming(filteredInitiatives,
new Date( new Date().getTime() - this.compareToTime.timePrior ),
!this.hideInitiativesInUAT)
!this.hideInitiativesInUAT);

function startBeforeDue(initiative) {
return initiative.team.start < initiative.team.due;
}

if(this.hideUnknownInitiatives) {
return {
initiatives: initiatives.filter( startBeforeDue),
releases: releases.map( release => {
return {
...release,
initiatives: release.initiatives.filter(startBeforeDue)
}
})
};
} else {
return {releases, initiatives};
}
}
get initiativesWithTimedEpics(){
return this.releasesAndInitiativesWithPriorTiming.initiatives;
}
get initiativesWithAStartAndEndDate(){
var initiatives = this.initiativesWithTimedEpics.filter( (i) => {
return i.team.start < i.team.due;
})
var initiatives = this.initiativesWithTimedEpics;

if(this.sortByDueDate) {
initiatives = initiatives.sort( (i1, i2) => i1.team.due - i2.team.due);
}
Expand Down
26 changes: 25 additions & 1 deletion public/timeline-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to the browser, no JIRA data even flows through our servers.
All the code is open source in [Github Issue](https://github.com/bitovi/jira-timeline-report) so you can verify this yourself or host it yourself.


## Need help or Have Questions?
## Need Help or Have Questions?

This project is supported by Bitovi, an [Agile Project Management consultancy](https://www.bitovi.com/services/agile-project-management-consulting). For bugs or feature requests, please submit a [Github Issue](https://github.com/bitovi/jira-timeline-report/issues).

Expand All @@ -37,3 +37,27 @@ Note, your epics and initiatives will need the following statuses for the tool t
The [Agile Project Management with Jira - Continuous Exploration](https://www.bitovi.com/academy/learn-agile-program-management-with-jira/continuous-exploration-board.html) training has
videos on how to create an initiative type with the right statuses.



## How Timing is Calculated

Initiative timing is calculated from __epic__ `Start date` and `Due date` fields. Initiative dates are _ignored_.
If the __epic__ does not have a `Start date` or `End date`, the stories within the __epic__ can be used to determine
the timing of the __epic__. In this case, the latest story's end date will be used as the epic's `End date`
and the earliest story's start date will be used as the epic's `Start date`.

Story timing itself is determined from:

- The `Start date` and `End date` of the story; or if these don't exist
- The story's sprints




__NOTE:__ To use story timing, you must use a JQL that includes stories.



## Labeling epics as QA or UAT

To label epics as part of an initiative's QA or UAT timing, add a `Label` that includes the characters `QA` or `UAT`.

0 comments on commit b488105

Please sign in to comment.