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
3 changes: 2 additions & 1 deletion core/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2395,8 +2395,9 @@ def explain_license_pool(self, pool):
for license in pool.licenses:
self.write("License ID: %s:" % (license.identifier))
self.write(
" Checkouts left: %s, Checkouts available: %s, Concurrency: %s , Expires: %s"
" Status: %s, Checkouts left: %s, Checkouts available: %s, Concurrency: %s , Expires: %s"
% (
license.status.value,
license.checkouts_left,
license.checkouts_available,
license.terms_concurrency,
Expand Down
12 changes: 8 additions & 4 deletions scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,10 +901,12 @@ def do_run(self):
"Work/Licensepool Identifier",
"Title",
"Author",
"Collection",
"First seen",
"Last seen (best guess)",
"Current licenses owned",
"Current licenses available",
"Current copies owned",
"Current copies available",
"Patrons in hold queue",
"Changes in number of licenses",
"Changes in title availability",
"License identifier",
Expand Down Expand Up @@ -998,9 +1000,10 @@ def explain(self, licensepool):
licensepool
)

data = [f"{identifier.type} {identifier.identifier}"]
data = [identifier.identifier]
if edition:
data.extend([f'"{edition.title}"', f'"{edition.author}"'])
data.append(licensepool.collection.name)
if licensepool.availability_time:
first_seen = licensepool.availability_time.strftime(self.format)
else:
Expand All @@ -1013,6 +1016,7 @@ def explain(self, licensepool):
data.append(last_seen)
data.append(licensepool.licenses_owned)
data.append(licensepool.licenses_available)
data.append(licensepool.patrons_in_hold_queue)

license_removals = []
for event in license_removal_events:
Expand Down Expand Up @@ -1048,7 +1052,7 @@ def explain(self, licensepool):
"",
"", # Fill the first 9 columns with empty strings
license.identifier,
license.status,
license.status.value,
license.checkouts_left,
license.checkouts_available,
license.terms_concurrency,
Expand Down