Patch #28138

Add link to add a new issue on the version page

Added by Holger Just almost 2 years ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:4.1.0

Description

When showing a single version, a common task is to edit issues there. For existing issues, users can easily use the context menu for that. To add issues however requires a rather complex workflow to go to the "new issue" page, select the version and create the issue.

The attached patch against the current trunk at r17192 adds a new link to the show page of a single version to directly add a new issue for that version in the version's project. It links to a pre-configured add-issue form. The patch was extracted from Planio.

0001-Add-New-issue-button-on-version-show-page.patch Magnifier (1.65 KB) Holger Just, 2018-02-05 17:23

0001-Display-new-issue-link-in-version-page.patch Magnifier (5.72 KB) Marius BALTEANU, 2019-06-25 19:04

0002-Return-to-version-page-after-the-issue-is-created.patch Magnifier (2.36 KB) Marius BALTEANU, 2019-06-25 19:04


Related issues

Duplicated by Redmine - Feature #5005: "New issue" link near roadmap issue lists. Closed 2010-03-07

Associated revisions

Revision 18755
Added by Jean-Philippe Lang about 1 month ago

Display new issue link in version page (#28138).

Patch by Marius BALTEANU.

Revision 18756
Added by Jean-Philippe Lang about 1 month ago

Return to version page after the issue is created (#28138).

Patch by Marius BALTEANU.

History

#1 Updated by Go MAEDA almost 2 years ago

  • Duplicated by Feature #5005: "New issue" link near roadmap issue lists. added

#2 Updated by Marius BALTEANU almost 2 years ago

Really nice improvement.

I think that we need some tests to cover the cases when the "Add issue" button should be shown or not. @Holger, if you can't add them, I can do it in the next weeks.

#3 Updated by Go MAEDA almost 2 years ago

  • Target version set to Candidate for next major release

I really like this improvement. In fact, I posted a similar patch #5005#note-6 years ago.

But I noticed that the "New issue" link is displayed even if the version is locked or closed. I think it would be better to check the status of the version when showing the link.

#4 Updated by Mischa The Evil almost 2 years ago

I'm just reading along – visually scanning the patches, while being aware of #5005. Nevertheless, I wanted to drop a thought regarding this patch.

In addition to the thing mentioned by Go in the previous note, the patch also doesn't seem to consider (at least) one of the two cases that Jean-Philippe mentioned in #5005#note-8, namely the possibility that the target version field may be read-only for the user. I am not entirely sure that the second case (target version field being not available for the default tracker) is properly covered by this patch, though. It looks like it, but I'd need to test that specifically.

Despite all the difficulties, I do like the actual proposal (just like I liked #5005).

#5 Updated by Yuuki NARA 9 months ago

+1

#6 Updated by Yuuki NARA 9 months ago

I added the following to the display condition of the issue addition button.
In my environment, this works well.

<% if @project.active? %>
<% if @version.open? %>

Below are the changes of my customized repository.
https://github.com/y503unavailable/redmine/commit/50e61c086bee55dfc74543a6931cb264f9a2e54e

#7 Updated by Marius BALTEANU 6 months ago

Based on the work made by Holger and Yuuki, I tried to create a new patch which takes into account all the conditions required for a user to add a new issue to a specific target version. The hardest part was to check if the user has permissions to edit the "Target version" field according to the workflow because without this, we can have cases where the "New issue" link points to a tracker without "Target version" field enabled (to reproduce: go to Workflow and set "Read only" permissions on all trackers and for all roles). I'm not very happy with the solution found, but it was the quickest.

Also, I'm attaching a second patch that returns the user to the version page after creating the issue.

Any feedback on this is welcome.

#8 Updated by Marius BALTEANU 3 months ago

  • Target version changed from Candidate for next major release to 4.1.0

Jean-Philippe Lang wrote in #5005#note-8:

Actually, this patch is problematic. There are many cases where these links wouldn't work, eg. the target version field is read-only for the user (just like here on redmine.org), or not available for the default tracker.

Can you take a look on my proposed patch from my previous note? It should cover most of the cases.

#9 Updated by Marius BALTEANU 3 months ago

  • Assignee set to Jean-Philippe Lang

#10 Updated by Jean-Philippe Lang about 1 month ago

  • Status changed from New to Closed

Committed, thanks.

Also available in: Atom PDF