stakwork / sphinx-tribes-frontend

Frontend for sphinx tribes and bounties. The bounty platform that pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
12 stars 42 forks source link

Bug: Creating a bounty as part of a feature doesn't register correctly #616

Open humansinstitute opened 1 week ago

humansinstitute commented 1 week ago

Context

When creating a bounty from within the Feature > Phase page and setting to "do not show public" the ticket fails to show.

Image

Step 2 here is related to https://github.com/stakwork/sphinx-tribes-frontend/issues/614

Tried a second assignment that was shown to public with the same issue. It appears this isn't due to public / non public althoguh that does affect step 2 in the image above.

See screen recording below.

https://github.com/user-attachments/assets/930a29f2-b52d-4cc2-9297-b98f351dca64

Hypothesis - permission issue returning the bounty details when not public?

humansinstitute commented 1 week ago

@elraphty - I think we're seeing a permissions issue here between the front and back end to resolve this endpoint and get the feature data. Can you investigate.

chiragDork commented 1 week ago

Hi @humansinstitute can you assign this to me

aliraza556 commented 1 week ago

Hi @humansinstitute, @elraphty

Currently, the frontend is not fetching the bounty response correctly due to an issue with the phase_uuid. As a result, the bounty is not being displayed correctly in the phase feature. In the demo below, you can see that only the title, price, and coding languages are shown, while other details are missing. Please review and merge this PR https://github.com/stakwork/sphinx-tribes/pull/1924 to resolve the issue.

Demo:

https://www.loom.com/share/1d0bf3704e3e4e1088c61b40874bc340

image

   {
        "id":1711,
        "owner_id":"02e8015a7b3e7a71991384b17d0890dbf13fecb84d9f12281c9515bb27ec770656",
        "paid":false,
        "show":true,
        "completed":false,
        "type":"freelance_job_request",
        "award":"",
        "assigned_hours":0,
        "bounty_expires":"",
        "commitment_fee":0,
        "price":344,
        "title":"tesfdhgs",
        "tribe":"None",
        "assignee":"02db5144cf9b637aa306e5a539a928f5991f17f34a68f85aba243431333473ca82",
        "ticket_url":"",
        "org_uuid":"",
        "workspace_uuid":"csnh174nuku26dqh5lo0",
        "description":"sdsds",
        "wanted_type":"Web development",
        "deliverables":"",
        "github_description":false,
        "one_sentence_summary":"",
        "estimated_session_length":"",
        "estimated_completion_date":"",
        "created":1731167592,
        "updated":"2024-11-09T15:53:12.77546Z",
        "assigned_date":"2024-11-09T15:53:12.77546Z",
        "coding_languages":[

        ],
        "phase_uuid":" ",
        "phase_priority":0,
        "payment_pending":false,
        "payment_failed":false
     },

Expected Behavior:

  [
     {
        "bounty":{
           "id":1,
           "owner_id":"alice",
           "paid":false,
           "show":true,
           "completed":false,
           "type":"bug",
           "award":"1000 USD",
           "assigned_hours":5,
           "bounty_expires":"2024-06-01T00:00:00Z",
           "commitment_fee":1000,
           "price":21,
           "title":"Phase 1 Bounty 1",
           "tribe":"None",
           "assignee":"",
           "ticket_url":"http://ticket.url",
           "org_uuid":"workspace-uuid-123",
           "workspace_uuid":"workspace-uuid-123",
           "description":"Detailed bug description",
           "wanted_type":"Bugfix",
           "deliverables":"Bug should be fixed",
           "github_description":true,
           "one_sentence_summary":"Fix bug in production",
           "estimated_session_length":"2 hours",
           "estimated_completion_date":"2024-05-25T00:00:00Z",
           "created":1731224728340,
           "updated":"2024-11-10T12:45:29.619383+05:00",
           "coding_languages":[
              "JavaScript",
              "Python"
           ],
           "phase_uuid":"com1mvgn1e4a1879uiv0",
           "phase_priority":1,
           "payment_pending":false,
           "payment_failed":false
        },
        "assignee":{
           "id":0,
           "uuid":"",
           "owner_pubkey":"",
           "owner_alias":"",
           "unique_name":"",
           "description":"",
           "tags":null,
           "img":"",
           "created":null,
           "updated":null,
           "unlisted":false,
           "deleted":false,
           "last_login":0,
           "owner_route_hint":"",
           "owner_contact_key":"",
           "price_to_meet":0,
           "new_ticket_time":0,
           "twitter_confirmed":false,
           "referred_by":0,
           "extras":null,
           "github_issues":null
        },
        "owner":{
           "id":0,
           "uuid":"",
           "owner_pubkey":"",
           "owner_alias":"",
           "unique_name":"",
           "description":"",
           "tags":null,
           "img":"",
           "created":null,
           "updated":null,
           "unlisted":false,
           "deleted":false,
           "last_login":0,
           "owner_route_hint":"",
           "owner_contact_key":"",
           "price_to_meet":0,
           "new_ticket_time":0,
           "twitter_confirmed":false,
           "referred_by":0,
           "extras":null,
           "github_issues":null
        },
        "organization":{
           "uuid":"",
           "name":"",
           "img":""
        },
        "workspace":{
           "uuid":"",
           "name":"",
           "img":""
        }
     }
  ]
humansinstitute commented 6 days ago

@aliraza556 - I can't test this on staging I get an error when trying to create any bounties on the staging site.

Are you able to attach a loom of this working locally whilst we get this fixed?

humansinstitute commented 6 days ago

@aliraza556 i was able to add a bounty if I don't link to github but I still see the same behaivour with the bounty not displaying despite being created?

Tested on people-test.sphinx.chat

image

aliraza556 commented 6 days ago

@aliraza556 i was able to add a bounty if I don't link to github but I still see the same behaivour with the bounty not displaying despite being created?

Tested on people-test.sphinx.chat

image

Hi @humansinstitute, Please merge this PR, then above issue is fixed https://github.com/stakwork/sphinx-tribes/pull/1935