gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Close issue as archived/resolved/stale

Open sillyguodong opened this issue 2 years ago • 23 comments

replace #23522 close #22793 close #14893

Changes

  • Add a dropdown next to the close/reopen button. The dropdown has the following options: close as archived/resolved/stale.
  • Modify the default email template of the Issue.
  • The API of "EditIssue" accepts new parameter: closed_status.

Screenshot

Close issue dropdown & button:

image

The comment of "close as xxx":

image

The default email content of the Issue:

image

Video record

https://github.com/go-gitea/gitea/assets/33891828/003603d8-b5da-463e-ba30-203242401172

sillyguodong avatar Jun 19 '23 01:06 sillyguodong

Run make lint-js-fix to fix the lint issues.

silverwind avatar Jun 20 '23 20:06 silverwind

There are still problem which I can't understand, for example, why you need a form in duplicate-issue-modal and why it should be submitted. If I understand correctly, you just want to choose an issue and pass the ID to the "comment form".

So I do not know how to review, sorry

wxiaoguang avatar Jun 27 '23 03:06 wxiaoguang

If I understand correctly, you just want to choose an issue and pass the ID to the "comment form".

I have removed the form in the duplicate-issue-modal and trigger the form submit manually after clicking confirm .

sillyguodong avatar Jun 27 '23 06:06 sillyguodong

@techknowlogick please tell me if the functionality of this PR now deviates from what is expected in the issue. If it does, i will keep fixing.

sillyguodong avatar Jun 30 '23 06:06 sillyguodong

Some tests for new functionality would be good.

silverwind avatar Jul 06 '23 19:07 silverwind

If merged, we have to extend the api type also, update the go-sdk and add it to the migrator

6543 avatar Jul 07 '23 11:07 6543

@sillyguodong a couple of notes:

  1. when closing as duplicate, etc.. and a comment is made "#X is closed as dupe of #Y", could you also ensure that the linked issue also has a message linking back?
  2. the "close as x,y,z" dropdown still shows when the issue is closed.

techknowlogick avatar Jul 07 '23 14:07 techknowlogick

I'm going to make some changes to the UI.

  • After clicking "close as duplicate" in the dropdown, the dialog of "select duplicate issue" will display.
  • And after clicking "confirm" in dialog, the dialog will hidden, and no submit form any more. The text of the close button will change to "close as duplicate {repo_name}/#{issue_index}"(issue name may be too long).

sillyguodong avatar Jul 11 '23 02:07 sillyguodong

After clicking "close as duplicate" in the dropdown, the dialog of "select duplicate issue" will display.

Is is really need? On GitHub I usually comment "Duplicate of #1234" and close as "Not planned" and I think that is sufficient as well and we woudn't need extra UI. See https://github.com/go-gitea/gitea/issues/25867 for an example.

silverwind avatar Jul 13 '23 18:07 silverwind

Is is really need? On GitHub I usually comment "Duplicate of #1234" and close as "Not planned" and I think that is sufficient as well and we woudn't need extra UI. See #25867 for an example.

@silverwind Since markdown editor haven't implemented # search function, and the keyword of "Duplicate of" also needs to be configurable to support multiple languages. It needs more work. So I think maybe dialog could be a temporary solution. what do you think about?

sillyguodong avatar Jul 14 '23 02:07 sillyguodong

I'm going to simplify this PR and just keep the functionality of "close as archived/resolved/stale". And I will create a new PR to complete the functionality of "close as duplicate".

sillyguodong avatar Jul 24 '23 08:07 sillyguodong

I will take a look and test it

wxiaoguang avatar Jul 31 '23 03:07 wxiaoguang

Well, TBH, I think there are still many problems ....

  1. Is the changed code initIssueSearchDropdown related to this PR? I don't see how it works
  2. For closed issue, the dropdown menu still exists? Then choose "Close as xxx", a no-op?
  3. UI misalignment

I haven't done a full test, just a quick look, I guess there might be more problems .....

image

image

wxiaoguang avatar Jul 31 '23 08:07 wxiaoguang

@wxiaoguang for 2 that is what I mentioned in my feedback above, but in exploring how github does it, they have the dropdown show even for closed items to change the closed status. So I think it is ok if we keep it this way.

techknowlogick avatar Aug 01 '23 02:08 techknowlogick

@wxiaoguang for 2 that is what I mentioned in my feedback above, but in exploring how github does it, they have the dropdown show even for closed items to change the closed status. So I think it is ok if we keep it this way.

That's different. GitHub's "close" can re-mark the close state as another again. But, this PR's behavior is buggy, it is a no-op (at least, during my test it is a no-op, nothing happened when I click it)

image

wxiaoguang avatar Aug 01 '23 02:08 wxiaoguang

But, this PR's behavior is buggy, it is a no-op (at least, during my test it is a no-op, nothing happened when I click it)

I made a mistake when resolving confilcts, it should be fixed in 5bf1e17.

sillyguodong avatar Aug 01 '23 02:08 sillyguodong

  1. UI misalignment

Misalignment fixed in ef2318a and e93ece6

Fix

image

sillyguodong avatar Aug 01 '23 03:08 sillyguodong

Can you explain why this is deleted? I think it causes bugs.

image

wxiaoguang avatar Aug 01 '23 03:08 wxiaoguang

Is this screenshot up to date?

For resolved, the issue state color for resolved should go purple, not red. For other states, please check on GitHub. I think stale/archived could go grey maybe. At least on GitHub "not planned" goes gray.

silverwind avatar Aug 11 '23 06:08 silverwind

See comment in https://github.com/go-gitea/gitea/issues/22793#issuecomment-1676290692, I think we should only have two closed states and not split into archived/stale.

silverwind avatar Aug 13 '23 09:08 silverwind

We will need to adapt issueicon.tmpl as per https://github.com/go-gitea/gitea/issues/22793#issuecomment-1685317256.

silverwind avatar Aug 20 '23 16:08 silverwind

The only reason I can think to need an 'archived' status is if you had a bug report that couldn't be verified - you could archive it to indicate that you couldn't find it rather than that it was a bug that you didn't plan to fix. Then again, I think the difference between 'we fixed this' and 'we couldn't/didn't fix this' in complete and not planned is probably sufficient to indicate that, and anyone particularly interested could just look through the issue comments.

GeekPro101 avatar Nov 25 '23 09:11 GeekPro101

I think it is also useful for when an issue was closed as stale, because the reporting user did not respond to a question in a long time. In that case the issue was not resolved, and I think "not planned" is not appropriate either because to me that would mean that the maintainers are not open to such a change.

mpeter50 avatar Nov 25 '23 11:11 mpeter50