-
Notifications
You must be signed in to change notification settings - Fork 83
Actions Board View Rule #2249
base: master
Are you sure you want to change the base?
Actions Board View Rule #2249
Changes from 3 commits
353edeb
6ea5c68
be9dae7
529be05
008f7ff
72ad9ce
ab89650
b7fa5c0
5589d68
f625367
00305cf
88fdfe9
a60efd3
532ca2f
fa75f51
13d3f53
9aab756
94ca51e
0edeacc
e832f8b
13640c8
1ce8bd8
5b4d19c
4764322
feecf1c
4b6acc6
35e6034
d867145
dab1b62
f758549
649ef2a
58f5187
973fe2d
69d1af4
9a8d624
5001aa2
7dafce4
595316f
6f4d7fb
3cb93a2
f83ff16
9f4de7d
5ff5380
89c8cb4
e71b346
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,7 +93,7 @@ func (act ActionStateToMetaState) loadWorkItemByID(id uuid.UUID) (*workitem.Work | |
| func (act ActionStateToMetaState) storeWorkItem(workitem *workitem.WorkItem) (*workitem.WorkItem, error) { | ||
| err := application.Transactional(act.Db, func(appl application.Application) error { | ||
| var err error | ||
| workitem, err = appl.WorkItems().Save(act.Ctx, workitem.SpaceID, *workitem, *act.UserID) | ||
| workitem, _, err = appl.WorkItems().Save(act.Ctx, workitem.SpaceID, *workitem, *act.UserID) | ||
| if err != nil { | ||
| return errs.Wrap(err, "error updating work item") | ||
| } | ||
|
|
@@ -361,9 +361,13 @@ func (act ActionStateToMetaState) onStateChange(newContext change.Detector, cont | |
| return nil, nil, err | ||
| } | ||
| // next, check which boards are relevant for this WI. | ||
| groups, err := act.Db.WorkItemTypeGroups().List(act.Ctx, wi.SpaceID) | ||
| space, err := act.Db.Spaces().Load(act.Ctx, wi.SpaceID) | ||
| if err != nil { | ||
| return nil, nil, err | ||
| return nil, nil, errs.Wrap(err, "error loading space: "+err.Error()) | ||
|
||
| } | ||
| groups, err := act.Db.WorkItemTypeGroups().List(act.Ctx, space.SpaceTemplateID) | ||
| if err != nil { | ||
| return nil, nil, errs.Wrap(err, "error loading type groups: "+err.Error()) | ||
|
||
| } | ||
| var relevantBoards []*workitem.Board | ||
| for _, board := range boards { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
appl.WorkItems().Saveis good enough. No need to have another function to wrap it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I still have to wrap it into a
Transactional, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think the way it is is easier to comprehend later.