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

Feat implement WorkItemAttachment and add relations to WorkItem #13

Merged
merged 16 commits into from
Oct 19, 2023

Conversation

micha91
Copy link
Collaborator

@micha91 micha91 commented Aug 30, 2023

This PR introduces the following features:

  • Implement WorkItemAttachment datamodel and post/patch/get methods
  • Make use of the relations field in the WorkItem to add stub links and attachments to the WorkItem
    • You have to add attachments or linkedWorkItems to the fields parameter to get them
    • Some fields are not included here and it seems like they cannot be added
  • There is a possibility to calculate a checksum for WorkItems
    • This checksum also includes all attachments and linked workitems
    • The client has a flag, which you can set to add the checksum when posting or patching a WorkItem
    • On patch the checksum has already to be calculated in advance to avoid a wrong checksum calculation, if a partial patch is performed

@micha91
Copy link
Collaborator Author

micha91 commented Aug 30, 2023

@ewuerger TBD: Do we want to include the ID in the checksum calculation? There is one big downside of this: When we initially post a WorkItem, we don't have the ID, so we would have to patch a WorkItem always at least once after creation.

@micha91 micha91 requested a review from ewuerger August 30, 2023 14:18
@ewuerger
Copy link
Member

Do we want to include the ID in the checksum calculation? There is one big downside of this: When we initially post a WorkItem, we don't have the ID, so we would have to patch a WorkItem always at least once after creation.

I think it makes only sense to include data which can change in the checksum. IDs are stable, on the other side the uuid_capella is included and does not bring the additional update on creation. From me it's a no.

Copy link
Member

@ewuerger ewuerger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny thing. Then: LGTM.

polarion_rest_api_client/data_models.py Show resolved Hide resolved
@ewuerger ewuerger merged commit c5fa8ba into main Oct 19, 2023
@ewuerger ewuerger deleted the feat-add-attachments-workitem-relations branch October 19, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants