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

[pivotal] Import Iterations #62

Merged
merged 4 commits into from
Apr 23, 2024
Merged

Conversation

semperos
Copy link
Member

From primary commit message:

The rows of the Pivotal export CSV each represent either a story or an
epic. The Pivotal iteration to which a story might belong is found in
an Iteration column, and when that is defined there are also populated
Iteration Start and Iteration End columns.

This commit extends the build_entity function to return an iteration
and pt_iteration_id entry for every row. The iteration entry is a
string containing the id, start, and end dates. A string was chosen
instead of a dict or other data structure, because those are not
hashable and thus not includable in a Python set, whereas a string
is. At commit() time, the unique set of these iteration strings is
used to create Shortcut Iterations.

The title of imported Iterations is "PT {id}" where id is the Pivotal
iteration ID. The start and end dates are also imported. At this time,
no Team/Group association is made for imported Iterations.

At commit() time this code also ensures each story is associated with
the correct imported Iteration.

@semperos semperos requested a review from opoku as a code owner April 19, 2024 20:33
@semperos semperos changed the title Import Iterations [pivotal] Import Iterations Apr 19, 2024
The rows of the Pivotal export CSV each represent either a story or an
epic. The Pivotal iteration to which a story might belong is found in
an Iteration column, and when that is defined there are also populated
Iteration Start and Iteration End columns.

This commit extends the build_entity function to return an iteration
and pt_iteration_id entry for every row. The iteration entry is a
string containing the id, start, and end dates. A string was chosen
instead of a dict or other data structure, because those are not
hashable and thus not includable in a Python set, whereas a string
is. At commit() time, the unique set of these iteration strings is
used to create Shortcut Iterations.

The title of imported Iterations is "PT {id}" where id is the Pivotal
iteration ID. The start and end dates are also imported. At this time,
no Team/Group association is made for imported Iterations.

At commit() time this code also ensures each story is associated with
the correct imported Iteration.
@semperos semperos force-pushed the daniel/sc-262854/import-iterations branch from ed5cdb6 to b0bcedb Compare April 19, 2024 20:35
Copy link
Member

@opoku opoku left a comment

Choose a reason for hiding this comment

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

This works. Had some minor comments. Did not actually test the code.

pivotal-import/pivotal_import.py Show resolved Hide resolved
pivotal-import/pivotal_import.py Show resolved Hide resolved
@semperos
Copy link
Member Author

Did not actually test the code.

For posterity, I did test this in a live Production workspace and it populated Iterations.

As of the previous commits in this PR, Iterations are now imported
from the PT export into Shortcut, and stories that belonged to the PT
iterations are assigned to the corresponding Shortcut Iterations.
@semperos semperos merged commit e93b119 into main Apr 23, 2024
2 checks passed
@semperos semperos deleted the daniel/sc-262854/import-iterations branch April 23, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants