#43 ✓resolved
James

Basket default privacy not accurately reflected in basket edit form

Reported by James | August 25th, 2008 @ 05:55 PM | in 1.1

Summary

In commit 6b4c9eb66f0c4374013a4016af59dfcbbf24f697, changes are introduced which improve the readability of the basket edit form. However, when the setting basket.default_private is nil (i.e. inherited), the form does not reflect this.

To reproduce

  1. Open or create a previously unedited basket
  2. Open the basket edit page
  3. Not the the setting for default privacy is "public", whereas it is actually inherited

I am actually not sure "Inherited" is ever selected when viewing the edit form. This should be checked.

To fix

Improve form handling logic

Comments and changes to this ticket

  • Kieran P

    Kieran P August 25th, 2008 @ 06:55 PM

    • Assigned user changed from “Kete” to “Kieran P”

    This functionality looks like it was merged in from one of my branches. I'll take a look ASAP.

  • Kieran P

    Kieran P August 26th, 2008 @ 01:53 PM

    • State changed from “new” to “open”

    When you bootstrap, the baskets were setting the values to false, not nil/null, so the behaviour was correct.

    That said, I did find some unrelated issues with logic and change the bootstrapped baskets to inherit from site basket right away. The behavior is not working as intended on my local copy.

    You can find the code on Github in bugfix_lh_43_incorrect_initial_settings

    Changes: http://github.com/kete/kete/comm...

    Using this code, are you still getting issues?

  • Walter McGinnis

    Walter McGinnis August 26th, 2008 @ 02:05 PM

    "The behavior is not working as intended on my local copy."

    You mean "is now working...", correct?

    Also, do we need a rake task added to kete:upgrade to fix bad data for existing sites? Seems like you would need to detect if the basket has been edited at all (compare created_at with updated_at) and if not, then make the change to the data.

    Cheers, Walter

    On Aug 26, 2008, at 1:53 PM, Lighthouse wrote:

  • Kieran P

    Kieran P August 26th, 2008 @ 02:09 PM

    • Milestone set to 1.1

    Yes, sorry. Was a typo. The behavior is now as it was meant to be.

    Re: the rake task, should be easy enough. I'll add this to my list once I finish another bug fix.

  • James

    James August 26th, 2008 @ 02:10 PM

    Do we all agree that the default privacy setting for baskets should be 'inherited from site'?

    Just wanted to check that this has been thought about, as previously it was 'private_default: false' .

    Cheers, James

    On 26/08/2008, at 2:05 PM, Lighthouse wrote:

  • Walter McGinnis

    Walter McGinnis August 26th, 2008 @ 02:35 PM

    The default in which context? The basket edit form? Could you be specific about where this was set as the default, please? The controller?

    I'm not seeing a default column value being set in the migration in db/ migrate/048_add_private_and_file_private_to_item_models.rb

    Or are you are strictly speaking about db/bootstrap/baskets.yml (i.e. what Kieran has changed)?

    Yes, I feel the standard baskets should inherit from site basket. Chances are that if someone wants the site basket to privacy controls on in the site basket, they will also want them in the standard baskets, too.

    Remember the standard baskets are generally only editable by site admins.

    Do you have a use case that we should consider?

    Cheers, Walter

    On Aug 26, 2008, at 2:10 PM, Lighthouse wrote:

  • James

    James August 26th, 2008 @ 02:55 PM

    Or are you are strictly speaking about db/bootstrap/baskets.yml (i.e. what Kieran has changed)?

    Yes, exactly. The bootstrap data.

    Yes, I feel the standard baskets should inherit from site basket. Chances are that if someone wants the site basket to privacy controls on in the site basket, they will also want them in the standard baskets, too.

    Remember the standard baskets are generally only editable by site admins.

    Right, cool.

    Do you have a use case that we should consider?

    I guess I was considering the case where someone changes the site basket and doesn't know/realise that the other baskets will inherit.

    However, given the changes to the basket edit pages (see Kieran's recent changes), it is very clear now and I don't think this will be an issue.

    So, I thing that the inheritance by default is fine.

    Just thought I'd check.

    James

  • Walter McGinnis

    Walter McGinnis August 26th, 2008 @ 03:05 PM

    Do you have a use case that we should consider?

    I guess I was considering the case where someone changes the site basket and doesn't know/realise that the other baskets will inherit.

    Right, to my mind if the admin hasn't set those specifically it is even more counterintuitive if they don't inherit.

    However, given the changes to the basket edit pages (see Kieran's recent changes), it is very clear now and I don't think this will be an issue.

    So, I thing that the inheritance by default is fine.

    Just thought I'd check.

    Yep, it is good to check.

    Cheers, Walter

    On Aug 26, 2008, at 2:55 PM, Lighthouse wrote:

  • James

    James August 26th, 2008 @ 05:43 PM

    Kieran, this looks to have resolved the issue I reported.

    Please merge and resolve.

    Thanks, James

  • Kieran P

    Kieran P August 26th, 2008 @ 05:54 PM

    • State changed from “open” to “resolved”

    Bugfix merged in. Resolving ticket.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.

People watching this ticket

Pages