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

[Feature] Show pending scene submissions on performer page #447

Open
JanJastrow opened this issue Jul 19, 2022 · 9 comments · May be fixed by #925
Open

[Feature] Show pending scene submissions on performer page #447

JanJastrow opened this issue Jul 19, 2022 · 9 comments · May be fixed by #925
Labels
enhancement New feature or request

Comments

@JanJastrow
Copy link

JanJastrow commented Jul 19, 2022

Is your feature request related to a problem? Please describe.
Since there is no search function on the edits page currently, it's hard to figure out if a new scene has already been posted.
(Happens with fresh releases)

Describe the solution you'd like
Show on the performers page a link to current pending scenes (just like performer edits right now)

Screenshot 2022-07-19 at 21 09 47

@JanJastrow JanJastrow added the enhancement New feature or request label Jul 19, 2022
@peolic
Copy link
Contributor

peolic commented Jul 20, 2022

the title of #301 doesn't make it obvious, but it's basically the same feature for both performers and studios.

@Flashy78
Copy link
Contributor

Flashy78 commented Feb 8, 2023

This has been implemented and can be closed.

@JanJastrow
Copy link
Author

Can you point me to the commit where this was implemented?
In the current live version at StashDB it is not implemented yet.

@JanJastrow JanJastrow changed the title [Feature] Show pending edits (submissions) on performer page [Feature] Show pending submissions on performer page Feb 8, 2023
@Flashy78
Copy link
Contributor

Flashy78 commented Feb 8, 2023

Ah ok, I understand after you changed the title.
The pending edits of a performer are shown, you want to see scenes for that performer.

@JanJastrow
Copy link
Author

Yes, I think the word "edits" was misleading.
I want an easy way to add check if a performer has currently pending scenes.
Currently I add them to Favs => Go to Pendings Edits => Filter "Favs" and then look around.

Should be rather easy to implement with a query.

@DogmaDragon DogmaDragon changed the title [Feature] Show pending submissions on performer page [Feature] Show pending scene submissions on performer page Dec 7, 2024
@ikmckenz
Copy link
Contributor

ikmckenz commented Jan 8, 2025

@InfiniteStash Would you prefer this to work by modifying the existing queryEdits to add support for cross-target edits (like, query scene edits by performer id, or scene edits by studio id), or would you prefer to see a new backend query for these types of cross target queries?

@InfiniteStash
Copy link
Collaborator

@InfiniteStash Would you prefer this to work by modifying the existing queryEdits to add support for cross-target edits (like, query scene edits by performer id, or scene edits by studio id), or would you prefer to see a new backend query for these types of cross target queries?

I think it makes the most sense to add a subquery to the existing condition here:

query.AddWhere(fmt.Sprintf(`

That one is already wired up on the frontend. It should just be a matter of selecting edits which have data->new->performers that include the target_id. I forget how you check if a json array contains an id, but it's used in various places already.

@ikmckenz
Copy link
Contributor

ikmckenz commented Jan 25, 2025

Okay I think I understand now, so your preferred solution modifies the existing queryEdits with a target id to not just return edits to the performer, for example, but to return both edits to the performer, and pending scene edits containing the performer, and have both displayed along side each other in the Edits tab. This would also mean we get the same for studios without further changes (get not just studio edits, but also scene edits containing the studio in the tab).
That might be slightly complicated because performers and studios have slightly different shape in the edit data JSON, but I'll play with the idea a bit and see what I can do.

ikmckenz added a commit to ikmckenz/stash-box that referenced this issue Jan 26, 2025
This adds all pending scene creation edits to the edits tabs for
performers, studios, and tags. Resolves stashapp#301 and stashapp#447.
@ikmckenz ikmckenz linked a pull request Jan 26, 2025 that will close this issue
@ikmckenz
Copy link
Contributor

Have the above working in PR #925, I don't love how the code looks generally but don't really see a super clean way to organize the code at this time.

Spent all too much time looking at query plans for these queries, managed to get them all looking good, no nested loops. Querying the performers with jsonb_array_elements() necessitated a nested loop but moving tojsonb_path_query_array() gets rid of it, I do see jsonb_array_elements() used in a few places throughout the code so might go on a query optimization drive after this.

@DogmaDragon DogmaDragon linked a pull request Jan 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants