Skip to content

Commit

Permalink
Add support for Tempo account filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Dec 10, 2020
1 parent 53a503e commit b4d1e8c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ jj s=<STATUS>

# Filter by sprint status
jj sp=<SPRINT_STATUS>

# Filter by Tempo account name (requires Tempo)
jj a=<ACCOUNT_NAME>
```
1 change: 1 addition & 0 deletions src/update-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const fields = [
'timeestimate',
'updated',
'customfield_10006',
'io.tempo.jira__account',
].join(',');

const MAX_RESULTS = 100;
Expand Down
7 changes: 6 additions & 1 deletion src/utils/format-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ module.exports = (config, issues) =>
}
}

return `p=${project} u=${assignee} s=${fields.status.name} ${sprint} ${key} ${fields.summary}`;
let account = '';
if (fields['io.tempo.jira__account'] && fields['io.tempo.jira__account'].value) {
account = `a=${fields['io.tempo.jira__account'].value}`;
}

return `p=${project} u=${assignee} s=${fields.status.name} ${account} ${sprint} ${key} ${fields.summary}`;
},
}));

0 comments on commit b4d1e8c

Please sign in to comment.