Skip to content

Commit

Permalink
fix: recent workogs with just created new issue
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPal committed Mar 14, 2018
1 parent 290ef83 commit 4bcb9d4
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions app/sagas/worklogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
uiActions,
} from 'actions';
import {
getResourceIds,
getResourceMap,
getUiState,
} from 'selectors';
Expand Down Expand Up @@ -101,14 +102,25 @@ export function* saveWorklog({
}: {
payload: any,
}): Generator<*, *, *> {
const worklogsA = createActionCreators(worklogId ? 'update' : 'create', {
resourceName: 'worklogs',
request: 'saveWorklog',
});
const issuesA = createActionCreators('update', {
const worklogsA = createActionCreators(
worklogId ? 'update' : 'create',
{
resourceName: 'worklogs',
request: 'saveWorklog',
},
);
const issuesActionsConfig = {
resourceName: 'issues',
request: 'updateIssue',
});
};
const recentIssues = yield select(getResourceIds('issues', 'recentIssues'));
if (recentIssues.length) {
issuesActionsConfig.list = 'recentIssues';
}
const issuesA = createActionCreators(
'update',
issuesActionsConfig,
);
try {
yield put(worklogsA.pending());
if (!worklogId) {
Expand Down

0 comments on commit 4bcb9d4

Please sign in to comment.