Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I marked as spam the issue by mistake.

may-solty December 7, 2019

I marked as spam a issue by mistake on Bitbucket Issue tracker...

Can I mark the issue as not spam?

2 answers

1 accepted

1 vote
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2019

Hello @may-solty,

Welcome to the Community!

I'm not sure if this was ever possible in UI. Maybe I overlooked something, but here's a not so trivial way to unmark issue as spam that works. This functionality is not exposed via API, so we'll need to make an extra step to authenticate the request.

  1. Navigate to the issues list of your repository. Locate the issue in question (it will look as greyed out) and note down its ID.
     issues — Bitbucket 2019-12-08 10-47-02.png
  2. Open browser developer tools. I'm doing this in Chrome but other browsers have similar capabilities.
  3. We need to find the CSRF token to authenticate request. It is stored in a cookie called crftoken. In Chrome this is under Application tab, StorageCookies section in the sidebar (in Firefox the tab is called Storage, then Cookies in the sidebar). Note down the value, we'll need it in the next step.
     issues — Bitbucket 2019-12-08 10-51-46.png
  4. Now switch to the Console tab and paste the following code, replacing placeholders:
    fetch('/<account>/<repo_slug>/issue/spam/<issue_id>', {
    method: 'POST',
    headers: {
    'X-CSRFToken': '<CSRF token>'
    }
    }).then(console.log)
    For instance, here's how it looks for my test issue from the screenshot above:
    fetch('/dpenkin/unspam/issue/spam/1', {
    method: 'POST',
    headers: {
    'X-CSRFToken': 'o3Z7Wz...'
    }
    }).then(console.log)
  5. Hit Enter. You'll see a response with 410 status code, but in fact the issue is now not marked as spam. Note that if you run same request again, you'll mark it as spam again.
  6. Refresh the issue list or navigate to the issue in question. It should now be not marked as spam anymore. You might need to force refresh the page to see the changes.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

may-solty December 7, 2019

Thank you for replying :)

I tried what you taught me.Then I was able to get it back! It was very helpful.

Thank you for kindly teaching me. Thank you dear Daniil!

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2019

No worries, I'm glad I was able to help :)

I really don't know why there's no way to do that in UI. I believe it existed at some point, but later on design changed, or the use case was considered as an edge case.

Anyway, I'm happy that the problem is now solved.

Like may-solty likes this
0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2019

The issue tracker for Bitbucket does not have a "mark as spam" function.

Could you tell us what you marked as spam mistakenly?  If it is a community post, we can un-spam it, and if it is something else, we can find a moderator.

may-solty December 7, 2019

Thank you for replying.

Really? Then I may have a mistake in the question?

Can you see this? This is a capture on Bitbucket/Issues screen at top of right side.

Thank you.

スクリーンショット 2019-12-07 22.18.01.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events