If a library has a circulation rule specific to their library and contains a Hard Due Date and also a circulation rule with a hard due date (set in the past) in the "Standard" set of rules, Koha is calling the standard rule first and then when prompted with a Yellow Box to enter a due date, if hit "Yes", Koha will then call the right rule (library-specific rule). Test: 1. Have a rule set up in a library-specific branch set with Hard Due Before Date in Future 2. Have the same rule set up in the standard set of rules with a Hard Due date set in the past. 3. Check out a book in the library that there is a library-specific rule. 4. Koha will call the standard set of rules, will be unable to assign a due date since it is in the past and present a library with a yellow box to enter a date. 5. If library hits YES without setting a date, Koha will call the due date using the correct (library-specific rules).
Issue here is fixed in bug 23382 - either it shoudl eb backported or we should cherry pick from commit f8e2c489cb668aab9e7484c2dd67c1c05f37b2a5
*** This bug has been marked as a duplicate of bug 23382 ***