Bug 30127 - By default show pending suggestions tab
Summary: By default show pending suggestions tab
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 7875
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-18 03:50 UTC by Fridolin Somers
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30127: By default show pending suggestions tab (6.04 KB, patch)
2022-02-18 06:24 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30127: By default show pending suggestions tab (1.74 KB, patch)
2022-04-30 02:48 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30127: By default show pending suggestions tab (1.72 KB, patch)
2022-05-03 06:47 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30127: By default show pending suggestions tab (1.77 KB, patch)
2022-05-03 08:36 UTC, David Nind
Details | Diff | Splinter Review
Bug 30127: By default show pending suggestions tab (1.83 KB, patch)
2022-05-06 09:06 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2022-02-18 03:50:47 UTC
Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875
Comment 1 Fridolin Somers 2022-02-18 06:24:35 UTC
Created attachment 130808 [details] [review]
Bug 30127: By default show pending suggestions tab

Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875

Changing order in perl code seems really difficult because it is a
generic code using GetDistinctValues()

Test plan :
1) Create some suggetions, accept some of them
2) In staff interface, click on 'More > Suggestions'
=> You see pending tab selected
3) In left menu, click on 'Suggestions' under 'Late orders'
=> You see pending tab selected
4) In left menu, use a filter, then click on '[clear]'
=> You see pending tab selected
5) Create a suggestion, click on 'cancel'
=> You see pending tab selected
6) Create a suggestion, click on 'Suggestions' in breadcrumbs
=> You see pending tab selected
7) Edit an existing suggestion, click on '<< Back to suggestions'
=> You see pending tab selected
Comment 2 Barbara Johnson 2022-02-25 16:20:11 UTC
All the steps worked except #5.  

On step 5 - I created a new suggestion and saved it but the screen defaulted to the Accepted tab instead of the Pending tab.

Also, editing and saving a suggestion defaulted to the Accepted tab instead of Pending.

Since the Pending tab is the most important one I think it should be the first tab followed by Accepted and then any other tabs a library uses.
Comment 3 Fridolin Somers 2022-04-30 02:48:28 UTC
Created attachment 134431 [details] [review]
Bug 30127: By default show pending suggestions tab

Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875

Changing order in perl code seems really difficult because it is a
generic code using GetDistinctValues()

Test plan :
1) Create some suggetions, accept some of them
2) In staff interface, click on 'More > Suggestions'
=> You see pending tab selected
3) In left menu, click on 'Suggestions' under 'Late orders'
=> You see pending tab selected
4) In left menu, use a filter, then click on '[clear]'
=> You see pending tab selected
5) Create a suggestion, click on 'cancel'
=> You see pending tab selected
6) Create a suggestion, click on 'Suggestions' in breadcrumbs
=> You see pending tab selected
7) Edit an existing suggestion, click on '<< Back to suggestions'
=> You see pending tab selected
8) Create a suggestion, click on 'Submit your suggestion'
=> You see pending tab selected
Comment 4 Fridolin Somers 2022-04-30 02:51:21 UTC
I've changed how I do the fix, changing directly the perl so that pending is always the first tab.

And added step 8 to test plan
Comment 5 David Nind 2022-04-30 08:27:00 UTC
For me, after applying the patch and adding some suggestions, I no longer get any tabs displaying for suggestions by status (tried in Firefox and Google Chrome).

I can post a screenshot if that doesn't make senses.
Comment 6 Fridolin Somers 2022-05-03 06:42:23 UTC
(In reply to David Nind from comment #5)
> For me, after applying the patch and adding some suggestions, I no longer
> get any tabs displaying for suggestions by status (tried in Firefox and
> Google Chrome).
> 
> I can post a screenshot if that doesn't make senses.

Ah indeed typo
I repush patch
Comment 7 Fridolin Somers 2022-05-03 06:47:53 UTC
Created attachment 134478 [details] [review]
Bug 30127: By default show pending suggestions tab

Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875

Changing order in perl code seems really difficult because it is a
generic code using GetDistinctValues()

Test plan :
1) Create some suggetions, accept some of them
2) In staff interface, click on 'More > Suggestions'
=> You see pending tab selected
3) In left menu, click on 'Suggestions' under 'Late orders'
=> You see pending tab selected
4) In left menu, use a filter, then click on '[clear]'
=> You see pending tab selected
5) Create a suggestion, click on 'cancel'
=> You see pending tab selected
6) Create a suggestion, click on 'Suggestions' in breadcrumbs
=> You see pending tab selected
7) Edit an existing suggestion, click on '<< Back to suggestions'
=> You see pending tab selected
8) Create a suggestion, click on 'Submit your suggestion'
=> You see pending tab selected
Comment 8 David Nind 2022-05-03 08:36:42 UTC
Created attachment 134485 [details] [review]
Bug 30127: By default show pending suggestions tab

Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875

Changing order in perl code seems really difficult because it is a
generic code using GetDistinctValues()

Test plan :
1) Create some suggetions, accept some of them
2) In staff interface, click on 'More > Suggestions'
=> You see pending tab selected
3) In left menu, click on 'Suggestions' under 'Late orders'
=> You see pending tab selected
4) In left menu, use a filter, then click on '[clear]'
=> You see pending tab selected
5) Create a suggestion, click on 'cancel'
=> You see pending tab selected
6) Create a suggestion, click on 'Suggestions' in breadcrumbs
=> You see pending tab selected
7) Edit an existing suggestion, click on '<< Back to suggestions'
=> You see pending tab selected
8) Create a suggestion, click on 'Submit your suggestion'
=> You see pending tab selected

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2022-05-06 08:53:58 UTC
Looking here
Comment 10 Katrin Fischer 2022-05-06 09:02:23 UTC
This appears to work, but can you clarify where the behavior changed?

When I test without the patches, the pending tab is also always the one displayed.


>7) Edit an existing suggestion, click on '<< Back to suggestions'
>=> You see pending tab selected

This one could be debatable, but it behaves like this already in my tests.
Someone might expect that you see the same tab that you edited the suggestion from. So if you edit an accepted suggestion, you return to this tab. (absolute not blocker)
Comment 11 Katrin Fischer 2022-05-06 09:04:45 UTC
Never mind, I found my mistake.
Comment 12 Katrin Fischer 2022-05-06 09:06:47 UTC
Created attachment 134714 [details] [review]
Bug 30127: By default show pending suggestions tab

Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875

Changing order in perl code seems really difficult because it is a
generic code using GetDistinctValues()

Test plan :
1) Create some suggetions, accept some of them
2) In staff interface, click on 'More > Suggestions'
=> You see pending tab selected
3) In left menu, click on 'Suggestions' under 'Late orders'
=> You see pending tab selected
4) In left menu, use a filter, then click on '[clear]'
=> You see pending tab selected
5) Create a suggestion, click on 'cancel'
=> You see pending tab selected
6) Create a suggestion, click on 'Suggestions' in breadcrumbs
=> You see pending tab selected
7) Edit an existing suggestion, click on '<< Back to suggestions'
=> You see pending tab selected
8) Create a suggestion, click on 'Submit your suggestion'
=> You see pending tab selected

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 13 Fridolin Somers 2022-05-11 08:48:58 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄