Skip to content

Policies for Bitstream: display stale group after policy changes #6192

Description

@Emil-Domagala-pcg

Description

DSpace allows changing the group that a Bitstream's Resource Policy applies to. However, when only the policy group is changed, the updated group name is not immediately reflected in the Bitstream Policies table after saving.

The UI continues to display the stale group name until the page is manually reloaded.

There is also a slightly different behavior when the policy name is changed at the same time as the group. In that case, the updated data is eventually displayed, although stale data may still be visible briefly after the redirect.

To reproduce

recorded jam

Changed only bitstream policy group

  1. Create an Item with a Bitstream.

  2. On the Item page, go to:
    Administer → Bitstreams → Edit any Bitstream.

  3. Select Edit bitstream's Policies.

    The Resource Policy table contains information such as Name and Group.

  4. Click Edit policy.

  5. Scroll to the bottom of the page and change the policy to a different group.

  6. Save the policy.

  7. After saving, DSpace redirects back to the Bitstream Policies page.

    The table still displays the previous group name, even though the policy was successfully changed:

  8. Reload the page.

    After reloading, the table displays the correct, updated group:

Alternative behavior

There is a second case where the behavior is slightly different.

If, while editing the policy, we change both the policy name and the policy group, the updated values are reflected in the UI after saving.

For example:

  1. Edit the policy.

  2. Change the policy name.

  3. Select a different policy group.

  4. Save the policy.

  5. After being redirected back to the Bitstream Policies page, the updated group is displayed in the UI:

However, stale data may still be displayed briefly before the current state is shown.

Expected behavior

After changing a Bitstream policy's group and being redirected back to the Bitstream Policies page, the table should immediately display the updated group without requiring a manual page reload.

The UI should consistently reflect the current state of the Resource Policy after saving, regardless of whether only the group was changed or other policy properties were changed as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

authorizationrelated to authorization, permissions or groupsbugclaimed: PCG AcademiaPCG Academia team is working on this issue & will contribute backcomponent: Item(Archived) Item display or editingperformance / cachingRelated to performance, caching or embedded objects

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions