Skip to content

Commit 305e563

Browse files
committed
Merge branch 'release/v0.13.16'
2 parents 6e0d488 + fc249c9 commit 305e563

11 files changed

Lines changed: 50 additions & 36 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [[0.13.16]](https://github.com/thoth-pub/thoth/releases/tag/v0.13.16) - 2026-03-06
10+
### Changed
11+
- [#731](https://github.com/thoth-pub/thoth/pull/731) - Ignore hyphens when filtering publications on ISBN
12+
913
## [[0.13.15]](https://github.com/thoth-pub/thoth/releases/tag/v0.13.15) - 2025-12-03
1014
### Changed
1115
- [#717](https://github.com/thoth-pub/thoth/pull/717) - Update Thema codes to v1.6

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -15,11 +15,11 @@ maintenance = { status = "actively-developed" }
1515
members = ["thoth-api", "thoth-api-server", "thoth-app", "thoth-app-server", "thoth-client", "thoth-errors", "thoth-export-server"]
1616

1717
[dependencies]
18-
thoth-api = { version = "=0.13.15", path = "thoth-api", features = ["backend"] }
19-
thoth-api-server = { version = "=0.13.15", path = "thoth-api-server" }
20-
thoth-app-server = { version = "=0.13.15", path = "thoth-app-server" }
21-
thoth-errors = { version = "=0.13.15", path = "thoth-errors" }
22-
thoth-export-server = { version = "=0.13.15", path = "thoth-export-server" }
18+
thoth-api = { version = "=0.13.16", path = "thoth-api", features = ["backend"] }
19+
thoth-api-server = { version = "=0.13.16", path = "thoth-api-server" }
20+
thoth-app-server = { version = "=0.13.16", path = "thoth-app-server" }
21+
thoth-errors = { version = "=0.13.16", path = "thoth-errors" }
22+
thoth-export-server = { version = "=0.13.16", path = "thoth-export-server" }
2323
clap = { version = "4.5.32", features = ["cargo", "env"] }
2424
dialoguer = { version = "0.11.0", features = ["password"] }
2525
dotenv = "0.15.0"

thoth-api-server/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-api-server"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -9,8 +9,8 @@ repository = "https://github.com/thoth-pub/thoth"
99
readme = "README.md"
1010

1111
[dependencies]
12-
thoth-api = { version = "=0.13.15", path = "../thoth-api", features = ["backend"] }
13-
thoth-errors = { version = "=0.13.15", path = "../thoth-errors" }
12+
thoth-api = { version = "=0.13.16", path = "../thoth-api", features = ["backend"] }
13+
thoth-errors = { version = "=0.13.16", path = "../thoth-errors" }
1414
actix-web = "4.10"
1515
actix-cors = "0.7.1"
1616
actix-http = "3.10.0"

thoth-api/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-api"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -25,7 +25,7 @@ backend = [
2525
]
2626

2727
[dependencies]
28-
thoth-errors = { version = "=0.13.15", path = "../thoth-errors" }
28+
thoth-errors = { version = "=0.13.16", path = "../thoth-errors" }
2929
actix-web = { version = "4.10", optional = true }
3030
argon2rs = { version = "0.2.5", optional = true }
3131
isbn = "0.6.0"

thoth-api/src/model/publication/crud.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ use super::{
33
PublicationHistory, PublicationOrderBy, PublicationType,
44
};
55
use crate::graphql::utils::Direction;
6-
use crate::model::{Crud, DbInsert, HistoryEntry};
6+
use crate::model::{Crud, DbInsert, HistoryEntry, Isbn};
77
use crate::schema::{publication, publication_history};
88
use crate::{crud_methods, db_insert};
9-
use diesel::{ExpressionMethods, PgTextExpressionMethods, QueryDsl, RunQueryDsl};
9+
use diesel::{
10+
dsl::sql, sql_types::Text, ExpressionMethods, PgTextExpressionMethods, QueryDsl, RunQueryDsl,
11+
};
1012
use thoth_errors::ThothResult;
1113
use uuid::Uuid;
1214

@@ -112,7 +114,11 @@ impl Crud for Publication {
112114
if let Some(filter) = filter {
113115
// ISBN field is nullable, so searching with an empty filter could fail
114116
if !filter.is_empty() {
115-
query = query.filter(isbn.ilike(format!("%{filter}%")));
117+
// Ignore ISBN hyphenation when searching
118+
query = query.filter(
119+
sql::<Text>("replace(isbn, '-', '')")
120+
.ilike(format!("%{}%", filter.replace("-", ""))),
121+
);
116122
}
117123
}
118124
query
@@ -144,7 +150,11 @@ impl Crud for Publication {
144150
if let Some(filter) = filter {
145151
// ISBN field is nullable, so searching with an empty filter could fail
146152
if !filter.is_empty() {
147-
query = query.filter(isbn.ilike(format!("%{filter}%")));
153+
// Ignore ISBN hyphenation when searching
154+
query = query.filter(
155+
sql::<Text>("replace(isbn, '-', '')")
156+
.ilike(format!("%{}%", filter.replace("-", ""))),
157+
);
148158
}
149159
}
150160

thoth-app-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-app-server"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"

thoth-app/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-app"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -29,8 +29,8 @@ semver = "1.0.26"
2929
serde = { version = "1.0", features = ["derive"] }
3030
serde_json = "1.0"
3131
uuid = { version = "1.16.0", features = ["serde", "v4", "js"] }
32-
thoth-api = { version = "=0.13.15", path = "../thoth-api" }
33-
thoth-errors = { version = "=0.13.15", path = "../thoth-errors" }
32+
thoth-api = { version = "=0.13.16", path = "../thoth-api" }
33+
thoth-errors = { version = "=0.13.16", path = "../thoth-errors" }
3434

3535
[build-dependencies]
3636
dotenv = "0.15.0"

thoth-client/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-client"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -10,8 +10,8 @@ readme = "README.md"
1010
build = "build.rs"
1111

1212
[dependencies]
13-
thoth-api = {version = "=0.13.15", path = "../thoth-api" }
14-
thoth-errors = {version = "=0.13.15", path = "../thoth-errors" }
13+
thoth-api = {version = "=0.13.16", path = "../thoth-api" }
14+
thoth-errors = {version = "=0.13.16", path = "../thoth-errors" }
1515
graphql_client = "0.14.0"
1616
chrono = { version = "0.4.40", features = ["serde"] }
1717
reqwest = { version = "0.12", features = ["json"] }
@@ -22,4 +22,4 @@ serde_json = "1.0"
2222
uuid = { version = "1.16.0", features = ["serde"] }
2323

2424
[build-dependencies]
25-
thoth-api = { version = "=0.13.15", path = "../thoth-api", features = ["backend"] }
25+
thoth-api = { version = "=0.13.16", path = "../thoth-api", features = ["backend"] }

thoth-errors/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-errors"
3-
version = "0.13.15"
3+
version = "0.13.16"
44
authors = ["Javier Arias <javi@thoth.pub>", "Ross Higman <ross@thoth.pub>"]
55
edition = "2021"
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)