Issue dependencies ui kind of broken #2076

Closed
opened 2025-11-02 04:23:22 -06:00 by GiteaMirror · 22 comments
Owner

Originally created by @Aragur on GitHub (Jul 20, 2018).

Description

In the dependencies list it only lists the last 8 issues relative to that one. For example issue #12 can only see issues #11 to #3. Also manual mention (for example of #1) doesn’t work.
Thanks to @Morlinest we already know more details:
Current work around is to search the exact issue name to add another.
Direct mention of the issue id is not working (but this should a thing).

Screenshots

Try to select #1 on issue #12
Try to select #1 on issue #12

Originally created by @Aragur on GitHub (Jul 20, 2018). - Gitea version (or commit ref): cc9fa06 - Git version: 2.18.0 - Operating system: Debian - Database: - [X] MySQL - Can you reproduce the bug at https://try.gitea.io: - [x] Yes: https://try.gitea.io/Aragur/Issue-Dependency_Issue/issues ## Description In the dependencies list it only lists the last 8 issues relative to that one. For example issue #12 can only see issues #11 to #3. Also manual mention (for example of #1) doesn’t work. Thanks to @Morlinest we already know [more details](https://github.com/go-gitea/gitea/pull/2531#issuecomment-406244674): Current work around is to search the exact issue name to add another. Direct mention of the issue id is not working (but this should a thing). ## Screenshots Try to select #1 on issue #12 ![Try to select #1 on issue #12](https://user-images.githubusercontent.com/11004008/42938281-0b66f986-8b52-11e8-852e-74babffe5df2.png)
GiteaMirror added the topic/uiissue/confirmedtype/bug labels 2025-11-02 04:23:22 -06:00
Author
Owner

@jonasfranz commented on GitHub (Jul 20, 2018):

Ping @kolaente

@jonasfranz commented on GitHub (Jul 20, 2018): Ping @kolaente
Author
Owner

@kolaente commented on GitHub (Jul 20, 2018):

This is something which should be fixed directly in the issue search, as I'm only using that (via the api). The results are the same as when you search on {projecturl}/issues.

I agree the issue search is not very good implemented.

@kolaente commented on GitHub (Jul 20, 2018): This is something which should be fixed directly in the issue search, as I'm only using that (via the api). The results are the same as when you search on `{projecturl}/issues`. I agree the issue search is not very good implemented.
Author
Owner

@kolaente commented on GitHub (Jul 20, 2018):

I'd rather have the search return issues by their index instead of frankensteining this into the dependencies.

@kolaente commented on GitHub (Jul 20, 2018): I'd rather have the search return issues by their index instead of frankensteining this into the dependencies.
Author
Owner

@stale[bot] commented on GitHub (Jan 17, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 17, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stevegt commented on GitHub (Mar 5, 2019):

Just noticed that direct mention of the issue id is still not working as of 7d973edf65.

@stevegt commented on GitHub (Mar 5, 2019): Just noticed that direct mention of the issue id is still not working as of 7d973edf65c664ea4bdb0efe455f03c486727fa2.
Author
Owner

@zeripath commented on GitHub (Mar 6, 2019):

@stevegt could you give a quick example of what you mean. Preferably with a try.gitea.io link?

It might be best to open another issue since this one is closed.

@zeripath commented on GitHub (Mar 6, 2019): @stevegt could you give a quick example of what you mean. Preferably with a try.gitea.io link? It might be best to open another issue since this one is closed.
Author
Owner

@stevegt commented on GitHub (Mar 6, 2019):

@zeripath A 'try' link won't help -- go to any issue you can edit and enter an issue number into the 'dependencies' field, either with or without a leading '#'. You'll see that you get an error response of 'Dependent issue does not exist.'

This issue was recently closed by stale bot due to lack of activity, not because it's been addressed. There has been no merge referencing it. Re-opening would be the normal thing to do, rather than fragment the conversation. I'll let it sit for a while to see if anyone with access re-opens. I may get to this with a fix myself at some point as well.

@stevegt commented on GitHub (Mar 6, 2019): @zeripath A 'try' link won't help -- go to any issue you can edit and enter an issue number into the 'dependencies' field, either with or without a leading '#'. You'll see that you get an error response of 'Dependent issue does not exist.' This issue was recently closed by stale bot due to lack of activity, not because it's been addressed. There has been no merge referencing it. Re-opening would be the normal thing to do, rather than fragment the conversation. I'll let it sit for a while to see if anyone with access re-opens. I may get to this with a fix myself at some point as well.
Author
Owner

@nascimentolwtn commented on GitHub (Mar 26, 2019):

For me is happening something similar, but it seems to be a cache problem, because if I create a sequence of issues, only old ones once shown are listed on new issues to be included as dependency. Also, it seems to show only the first page of opened issues (typing '#' would help).

A workaround: change browser or clear cache history.

@nascimentolwtn commented on GitHub (Mar 26, 2019): For me is happening something similar, but it seems to be a cache problem, because if I create a sequence of issues, only old ones once shown are listed on new issues to be included as dependency. Also, it seems to show only the first page of opened issues (typing '#' would help). A workaround: change browser or clear cache history.
Author
Owner

@xf- commented on GitHub (May 11, 2019):

@nascimentolwtn i think is is caused by service worker and caching the result

@xf- commented on GitHub (May 11, 2019): @nascimentolwtn i think is is caused by service worker and caching the result
Author
Owner

@lesh59 commented on GitHub (Dec 4, 2020):

I think the dependency drop down is only showing the first page of issues. Changing the ISSUE_PAGING_NUM in app.ini to a larger number showed more issues in the drop down (and on the issues page of course). The drop down should not be affected by "pages", should be all issues, filtered as you type.

@lesh59 commented on GitHub (Dec 4, 2020): I think the dependency drop down is only showing the first page of issues. Changing the **ISSUE_PAGING_NUM** in app.ini to a larger number showed more issues in the drop down (and on the issues page of course). The drop down should not be affected by "pages", should be all issues, filtered as you type.
Author
Owner

@samaust commented on GitHub (Mar 8, 2021):

Tested on version 1.11.6 :

  • Searching the title of an issue that is not in the choices shown in the drop-down menu works.
  • Searching the linked reference (mike/compiler#1234) does not return results.
@samaust commented on GitHub (Mar 8, 2021): Tested on version 1.11.6 : * Searching the title of an issue that is not in the choices shown in the drop-down menu works. * Searching the linked reference (mike/compiler#1234) does not return results.
Author
Owner

@6543 commented on GitHub (Mar 8, 2021):

@samaust sorry, we dont support anymore v1.11.6 & you should upgrade for security reasons

@6543 commented on GitHub (Mar 8, 2021): @samaust sorry, we dont support anymore v1.11.6 & you should upgrade for security reasons
Author
Owner

@stevegt commented on GitHub (Mar 18, 2021):

@6543 The fact that @samaust is running an old version is orthogonal to this issue -- the bug still exists in 1.14.0+dev-874-ge8ad6c1ff.

@stevegt commented on GitHub (Mar 18, 2021): @6543 The fact that @samaust is running an old version is orthogonal to this issue -- the bug still exists in 1.14.0+dev-874-ge8ad6c1ff.
Author
Owner

@Giszmo commented on GitHub (Apr 14, 2022):

I installed from snap yesterday and ran into this same issue.

gitea 1.16.5

Not sure if bugbounties are welcome but I'd tip $50 in BTC for this to be fixed.

@Giszmo commented on GitHub (Apr 14, 2022): I installed from snap yesterday and ran into this same issue. gitea 1.16.5 Not sure if bugbounties are welcome but I'd tip $50 in BTC for this to be fixed.
Author
Owner

@Ryuno-Ki commented on GitHub (Jun 5, 2022):

The relevant template is

73382d2132/templates/repo/issue/view_content/sidebar.tmpl (L517-L534)

The associated JavaScript

73382d2132/web_src/js/features/repo-issue.js (L89-L123)

A few questions come to my mind:

  1. Why is the JavaScript using .data() here? (see https://docs.gitea.io/en-us/guidelines-frontend/#html-attributes-and-dataset )
  2. I can see AJAX requests like /issues/search?q=some&priority_repo_id=2&type=all&_=1654452403354 Where is the associated router? (formerly using /api/v1/repos/issues/search. Changed in 783a021889 (diff-d39a63ccfd5f0fe703f74ce48a3624ba59a856317b0d236d7eae87dfcf6c1c20) ) The one below?
  3. Searching for something in the title or body (whole words) work. We want to reference the issue ID here, though.

7b089c465d/routers/web/repo/search.go (L19-L58)

@Ryuno-Ki commented on GitHub (Jun 5, 2022): The relevant template is https://github.com/go-gitea/gitea/blob/73382d2132f8f242245d83f66c92761e0b477b91/templates/repo/issue/view_content/sidebar.tmpl#L517-L534 The associated JavaScript https://github.com/go-gitea/gitea/blob/73382d2132f8f242245d83f66c92761e0b477b91/web_src/js/features/repo-issue.js#L89-L123 A few questions come to my mind: 1. Why is the JavaScript using `.data()` here? (see https://docs.gitea.io/en-us/guidelines-frontend/#html-attributes-and-dataset ) 2. I can see AJAX requests like `/issues/search?q=some&priority_repo_id=2&type=all&_=1654452403354` Where is the associated router? (formerly using `/api/v1/repos/issues/search`. Changed in https://github.com/go-gitea/gitea/commit/783a02188970ba5800514f7c64f6a818f65c04a1#diff-d39a63ccfd5f0fe703f74ce48a3624ba59a856317b0d236d7eae87dfcf6c1c20 ) The one below? 3. Searching for something in the title or body (whole words) work. We want to reference the issue ID here, though. https://github.com/go-gitea/gitea/blob/7b089c465d9f851454be91ca209ab26782648a45/routers/web/repo/search.go#L19-L58
Author
Owner

@Ryuno-Ki commented on GitHub (Jun 5, 2022):

I got an explanation on routers in the chat.

The router in

d9b50e4fd1/routers/web/web.go (L320)

passes the request to SearchIssues:

744e452185/routers/web/repo/issue.go (L2144-L2317)

That makes

744e452185/modules/indexer/issues/indexer.go (L385-L401)

the code that searches the issues.

Therefore, this issue is likely not of kind/ui.

@Ryuno-Ki commented on GitHub (Jun 5, 2022): I got an explanation on routers in the chat. The router in https://github.com/go-gitea/gitea/blob/d9b50e4fd126e60fe0735bafbcb12d0e8f6dd0c2/routers/web/web.go#L320 passes the request to `SearchIssues`: https://github.com/go-gitea/gitea/blob/744e45218579fe2fd130b91d9fb95ec4becd314d/routers/web/repo/issue.go#L2144-L2317 That makes https://github.com/go-gitea/gitea/blob/744e45218579fe2fd130b91d9fb95ec4becd314d/modules/indexer/issues/indexer.go#L385-L401 the code that searches the issues. Therefore, this issue is likely not of `kind/ui`.
Author
Owner

@wxiaoguang commented on GitHub (Jun 6, 2022):

I can answer some of your questions.

  1. Why is the JavaScript using .data() here? (see guideline )

There are a lot of legacy frontend code (as old as years ago). The rule for using attr instead of data was suggested by silverwind a few months ago and I wrote it into the guideline. For me, I am doing my best to make sure ever line of JS I touched follows the guideline.

  1. I can see AJAX requests like .. Where is the associated router?

The easiest way is just to run the code, and watch the output log. You will see the called router function in logs (zeripath and I added this feature in 1.17, to make develop & debug more easily)

  1. Searching for something in the title or body (whole words) work. We want to reference the issue ID here, though.

Yup, it's better to make the Issue Index can be searched or just loaded by hard-code (indeed, the number of the issue is called index internally, not id)

@wxiaoguang commented on GitHub (Jun 6, 2022): I can answer some of your questions. 1. Why is the JavaScript using .data() here? (see [guideline](https://docs.gitea.io/en-us/guidelines-frontend/#html-attributes-and-dataset) ) There are a lot of legacy frontend code (as old as years ago). The rule for using `attr` instead of `data` was suggested by silverwind a few months ago and I wrote it into the guideline. For me, I am doing my best to make sure ever line of JS I touched follows the guideline. * https://github.com/go-gitea/gitea/pull/17699 * https://github.com/go-gitea/gitea/pull/17597 2. I can see AJAX requests like .. Where is the associated router? The easiest way is just to run the code, and watch the output log. You will see the called router function in logs (zeripath and I added this feature in 1.17, to make develop & debug more easily) * https://github.com/go-gitea/gitea/pull/17308 3. Searching for something in the title or body (whole words) work. We want to reference the issue ID here, though. Yup, it's better to make the `Issue Index` can be searched or just loaded by hard-code (indeed, the number of the issue is called `index` internally, not `id`)
Author
Owner

@d33pjs commented on GitHub (Aug 10, 2022):

Having (still) the same issue. Is someone working on that? Or are there any workarounds in the meantime?

@d33pjs commented on GitHub (Aug 10, 2022): Having (still) the same issue. Is someone working on that? Or are there any workarounds in the meantime?
Author
Owner

@silkentrance commented on GitHub (Jun 25, 2024):

Partial matching of words is possible but might be expensive.

Bleve

Partial matching with bleve is a no brainer if you use camel case in your wording, which, of course, will not always work.

So, searching for 'iss' will never find 'issue'.
Yet, searching for 'foo' will find 'FooBar' or 'fooBar'.
The same goes for 't2', which can be found by a search for either 't' or '2'.

@silkentrance commented on GitHub (Jun 25, 2024): Partial matching of words is possible but might be expensive. ## Bleve Partial matching with bleve is a no brainer if you use camel case in your wording, which, of course, will not always work. So, searching for 'iss' will never find 'issue'. Yet, searching for 'foo' will find 'FooBar' or 'fooBar'. The same goes for 't2', which can be found by a search for either 't' or '2'. - https://github.com/blevesearch/bleve/issues/321#issuecomment-171345533
Author
Owner

@6543 commented on GitHub (Jun 26, 2024):

I propose> create a popup template that based on usage has preset filters. (e.g. only issues/pulls of repo X)

and let issues search via keyword or number have it live updated...
... multiselect would be nice
... filter for closed and open

use that:

  • for adding issues/pulls in project board view to add to the project
  • adding dependencys

mockup:
image

@6543 commented on GitHub (Jun 26, 2024): I propose> create a popup template that based on usage has preset filters. (e.g. only issues/pulls of repo X) and let issues search via keyword or number have it live updated... ... multiselect would be nice ... filter for closed and open use that: - for adding issues/pulls in project board view to add to the project - adding dependencys mockup: ![image](https://github.com/go-gitea/gitea/assets/24977596/30d96913-7066-49b4-9001-9b56d8aaa40e)
Author
Owner

@silkentrance commented on GitHub (Jun 26, 2024):

I propose> create a popup template that based on usage has preset filters. (e.g. only issues/pulls of repo X)

and let issues search via keyword or number have it live updated... ... multiselect would be nice ... filter for closed and open

use that:

  • for adding issues/pulls in project board view to add to the project
  • adding dependencys

mockup: image

I propose> create a popup template that based on usage has preset filters. (e.g. only issues/pulls of repo X)

and let issues search via keyword or number have it live updated... ... multiselect would be nice ... filter for closed and open

use that:

  • for adding issues/pulls in project board view to add to the project
  • adding dependencys

mockup: image

I strongly believe that this is an altogether different feature request.
Please make this a different issue. The issue at hand is already complex and does not require any additional complexity.

Personally, I have a different approach in mind.
One. which will move the dependency management to below the original issue/pr "description" and right before the follow-up comments, similar to for example *ira.

@silkentrance commented on GitHub (Jun 26, 2024): > I propose> create a popup template that based on usage has preset filters. (e.g. only issues/pulls of repo X) > > and let issues search via keyword or number have it live updated... ... multiselect would be nice ... filter for closed and open > > use that: > > * for adding issues/pulls in project board view to add to the project > * adding dependencys > > mockup: ![image](https://private-user-images.githubusercontent.com/24977596/343239078-30d96913-7066-49b4-9001-9b56d8aaa40e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0MzUwOTMsIm5iZiI6MTcxOTQzNDc5MywicGF0aCI6Ii8yNDk3NzU5Ni8zNDMyMzkwNzgtMzBkOTY5MTMtNzA2Ni00OWI0LTkwMDEtOWI1NmQ4YWFhNDBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDIwNDYzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4YmE1NDY3NjI1MjM0MWViY2FkODU1NTkxZTU4MmExMzA0NWU3ZjEyNDM4YmE0Y2NlMmYxNDUyYmQ0ODBkNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.63RN-e1VdCZjzrTPOG3xlPHeOKwK2E_BrWwEuppCrmw) > I propose> create a popup template that based on usage has preset filters. (e.g. only issues/pulls of repo X) > > and let issues search via keyword or number have it live updated... ... multiselect would be nice ... filter for closed and open > > use that: > > * for adding issues/pulls in project board view to add to the project > * adding dependencys > > mockup: ![image](https://private-user-images.githubusercontent.com/24977596/343239078-30d96913-7066-49b4-9001-9b56d8aaa40e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0MzUwOTMsIm5iZiI6MTcxOTQzNDc5MywicGF0aCI6Ii8yNDk3NzU5Ni8zNDMyMzkwNzgtMzBkOTY5MTMtNzA2Ni00OWI0LTkwMDEtOWI1NmQ4YWFhNDBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDIwNDYzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4YmE1NDY3NjI1MjM0MWViY2FkODU1NTkxZTU4MmExMzA0NWU3ZjEyNDM4YmE0Y2NlMmYxNDUyYmQ0ODBkNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.63RN-e1VdCZjzrTPOG3xlPHeOKwK2E_BrWwEuppCrmw) I strongly believe that this is an altogether different feature request. Please make this a different issue. The issue at hand is already complex and does not require any additional complexity. Personally, I have a different approach in mind. One. which will move the dependency management to below the original issue/pr "description" and right before the follow-up comments, similar to for example *ira.
Author
Owner

@silkentrance commented on GitHub (Jun 26, 2024):

What is required here as a solution, is search by

@silkentrance commented on GitHub (Jun 26, 2024): What is required here as a solution, is search by - https://github.com/go-gitea/gitea/pull/31479 - any non db based indexer: fuzziness properly configured and using the proper queries on issue title - for db only indexer: proper like query constructs on issue title
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2076