Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circulation info should take into account temporary item type in public view #2965

Closed
PascalRepond opened this issue Jun 22, 2022 · 1 comment · Fixed by rero/rero-ils-ui#976 or #3361
Assignees
Labels
client request Issue reported by production libraries correction An implemented feature doesn't work as expected. f: public ui Public interface, as opposed to the professional interface UX User experience, ergonomy

Comments

@PascalRepond
Copy link
Contributor

PascalRepond commented Jun 22, 2022

How it works

In the document brief view (public UI), the field circulation_information of the item type displayed in the holdings doesn't take into account if there is a temporary item type. The circulation_information always comes from the main item type.

Example:
https://ils.test.rero.ch/aoste/documents/1170
has item type : https://ils.test.rero.ch/api/item_types/16 with circulation info
has temporary item type : https://ils.test.rero.ch/api/item_types/1 without circulation info
Circulation info displayed in the public view is from item type 16.

Improvement suggestion

    @property
    def available(self):
        """Get availability for item.

        An item is 'available' if there are no related request/active_loan and
        if the related or temporary circulation category doesn't specify
        a negative availability.
        All masked items are considered as unavailable.
        """
        if self.get('_masked', False):
            return False
        if self.item_has_active_loan_or_request() > 0:
            return False
        if self.circulation_category.get('negative_availability'):
            return False
        if self.temp_item_type_negative_availability:
            return False
        if self.is_issue and self.issue_status != ItemIssueStatus.RECEIVED:
            return False
        return True

Mockup

image

@PascalRepond PascalRepond added f: public ui Public interface, as opposed to the professional interface p-Medium Medium priority (to be solved within 1-2 years) p-Low Low priority UX User experience, ergonomy correction An implemented feature doesn't work as expected. client request Issue reported by production libraries and removed p-Low Low priority labels Jun 22, 2022
@github-actions
Copy link

github-actions bot commented Jan 1, 2023

This issue is stale because it has been open 6 months with no activity.

@github-actions github-actions bot added the stale Stale or no longer relevant label Jan 1, 2023
@github-actions github-actions bot closed this as completed Jan 1, 2023
@PascalRepond PascalRepond reopened this Jan 2, 2023
@PascalRepond PascalRepond removed the stale Stale or no longer relevant label Jan 2, 2023
@PascalRepond PascalRepond removed the p-Medium Medium priority (to be solved within 1-2 years) label Mar 30, 2023
@PascalRepond PascalRepond moved this to Project Backlog in RERO ILS issues Mar 30, 2023
@Garfield-fr Garfield-fr self-assigned this Apr 25, 2023
@Garfield-fr Garfield-fr moved this from Product Backlog to In Development in RERO ILS issues Apr 25, 2023
Garfield-fr added a commit to Garfield-fr/rero-ils-ui that referenced this issue Apr 25, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@Garfield-fr Garfield-fr moved this from In Development to Ready to test in RERO ILS issues Apr 25, 2023
PascalRepond pushed a commit to rero/rero-ils-ui that referenced this issue Apr 26, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@PascalRepond PascalRepond moved this from Ready to test to In testing in RERO ILS issues Apr 26, 2023
@PascalRepond PascalRepond moved this from In testing to Ready to test in RERO ILS issues Apr 27, 2023
@PascalRepond PascalRepond moved this from Ready to test to In Development in RERO ILS issues May 2, 2023
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 7, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils-ui that referenced this issue Jun 7, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 7, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 7, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils-ui that referenced this issue Jun 7, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to rero/rero-ils-ui that referenced this issue Jun 7, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit that referenced this issue Jun 7, 2023
* Closes #2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 7, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@Garfield-fr Garfield-fr moved this from In Development to Ready to test in RERO ILS issues Jun 12, 2023
@Garfield-fr Garfield-fr moved this from Ready to test to In testing in RERO ILS issues Jun 12, 2023
@PascalRepond PascalRepond moved this from In testing to In Development in RERO ILS issues Jun 12, 2023
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 20, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 20, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils-ui that referenced this issue Jun 20, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@Garfield-fr Garfield-fr moved this from In Development to Ready to test in RERO ILS issues Jun 20, 2023
PascalRepond pushed a commit to rero/rero-ils-ui that referenced this issue Jun 20, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 20, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
PascalRepond pushed a commit that referenced this issue Jun 20, 2023
* Closes #2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@PascalRepond PascalRepond moved this from Ready to test to In testing in RERO ILS issues Jun 20, 2023
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 20, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@Garfield-fr Garfield-fr moved this from In testing to In Development in RERO ILS issues Jun 20, 2023
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jun 20, 2023
* Closes rero#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@Garfield-fr Garfield-fr moved this from In Development to Ready to test in RERO ILS issues Jun 20, 2023
@PascalRepond PascalRepond moved this from Ready to test to In testing in RERO ILS issues Jun 21, 2023
PascalRepond pushed a commit to rero/rero-ils-ui that referenced this issue Jun 21, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
PascalRepond pushed a commit that referenced this issue Jun 21, 2023
* Closes #2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@PascalRepond PascalRepond moved this from In testing to Approved in RERO ILS issues Jun 22, 2023
Garfield-fr added a commit that referenced this issue Jun 22, 2023
* Closes #2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@github-project-automation github-project-automation bot moved this from Approved to Done in RERO ILS issues Jun 22, 2023
Garfield-fr added a commit to rero/rero-ils-ui that referenced this issue Jun 22, 2023
In the public view, added circulation information.

* Closes rero/rero-ils#2965.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client request Issue reported by production libraries correction An implemented feature doesn't work as expected. f: public ui Public interface, as opposed to the professional interface UX User experience, ergonomy
Projects
Archived in project
2 participants