Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jupiter/src/storage/issue_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ impl IssueStorage {
JoinType::LeftJoin,
callisto::entity_ext::mega_issue::Relation::ItemLabels.def(),
)
.join(
JoinType::LeftJoin,
callisto::entity_ext::mega_issue::Relation::ItemAssignees.def(),
)
.filter(mega_issue::Column::Status.eq(params.status))
.filter(cond)
.distinct();
Expand Down
4 changes: 4 additions & 0 deletions jupiter/src/storage/mr_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ impl MrStorage {
JoinType::LeftJoin,
callisto::entity_ext::mega_mr::Relation::ItemLabels.def(),
)
.join(
JoinType::LeftJoin,
callisto::entity_ext::mega_mr::Relation::ItemAssignees.def(),
)
.filter(mega_mr::Column::Status.is_in(status))
.filter(cond)
.distinct();
Expand Down
3 changes: 3 additions & 0 deletions mono/src/api/issue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub mod issue_router;

#[derive(Serialize, Deserialize, ToSchema)]
pub struct ItemRes {
pub id: i64,
pub link: String,
pub title: String,
pub status: String,
Expand All @@ -26,6 +27,7 @@ impl From<ItemDetails> for ItemRes {
fn from(value: ItemDetails) -> Self {
match value.item {
ItemKind::Issue(model) => Self {
id: model.id,
link: model.link,
title: model.title,
status: model.status.to_string(),
Expand All @@ -39,6 +41,7 @@ impl From<ItemDetails> for ItemRes {
comment_num: value.comment_num,
},
ItemKind::Mr(model) => Self {
id: model.id,
link: model.link,
title: model.title,
status: format!("{:?}", model.status),
Expand Down
1 change: 0 additions & 1 deletion mono/src/api/label/label_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub fn routers() -> OpenApiRouter<MonoApiServiceState> {
tag = LABEL_TAG
)]
async fn fetch_label_list(
_user: LoginUser,
state: State<MonoApiServiceState>,
Json(json): Json<PageParams<String>>,
) -> Result<Json<CommonResult<CommonPage<LabelItem>>>, ApiError> {
Expand Down
Loading