Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW ticket information #519

Closed
3 tasks done
Tracked by #513
drjova opened this issue Aug 7, 2024 · 1 comment · Fixed by inspirehep/backoffice#86
Closed
3 tasks done
Tracked by #513

SNOW ticket information #519

drjova opened this issue Aug 7, 2024 · 1 comment · Fixed by inspirehep/backoffice#86

Comments

@drjova
Copy link
Contributor

drjova commented Aug 7, 2024

We need to enhance our existing workflow model by including it in the serializer and adding an attribute for ticket_url.

TECH NOTES

  • Update the workflow serializer to Include the WorkflowTicket .
  • Add a dynamic attribute for ticket_url to the WorkflowTicket serializer.
  • The workflow author API should return additionally:
{
    "tickets": [
        {
             “ticket”t_id": “”, 
             “ticket_url”: “”
        }
    ]
}

Example Serializer:

class WorkflowTicketSerializer(serializers.ModelSerializer):
    class Meta:
        model = WorkflowTicket
        fields = ['workflow_id', 'ticket_id', 'ticket_type', 'ticket_url']

    def get_ticket_url(self, obj):
        # Assuming you have a method or a property to generate the URL for a ticket.
        return f"https://example.com/tickets/{obj.ticket_id}"


class WorkflowAuthorsSerializer(serializers.ModelSerializer):
    tickets = WorkflowTicketSerializer(many=True, read_only=True)
    
    class Meta:
        model = Workflow
        fields = ['id', 'workflow_type', 'data', 'status',  'is_update', '_created_at', '_updated_at', 'tickets']
@karolina-siemieniuk-morawska
Copy link
Collaborator

TECH NOTES (for UI part):

  1. In AuthorDetailPageContainer.tsx handle new data structure for SNow ticket.

@DonHaul DonHaul self-assigned this Aug 16, 2024
karolina-siemieniuk-morawska added a commit to karolina-siemieniuk-morawska/inspirehep that referenced this issue Aug 23, 2024
DonHaul added a commit to DonHaul/inspirehep that referenced this issue Sep 2, 2024
DonHaul added a commit to DonHaul/inspirehep that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants