jazz-community / rtc-git-connector

Connect RTC work items with commits, issues, and requests from GitHub or GitLab
MIT License
6 stars 6 forks source link

Create Work Items from Git Issues #30

Closed MartinBenninger closed 6 years ago

MartinBenninger commented 6 years ago

This adds a new mode to the plugin.

The new mode kicks in when viewing a new work item in the work item editor. The button is still disabled if the work item has been edited, even if it's new. This is to prevent overriding user entered data.

The new mode allows for creating work items from Git issues. The user can only select issues (no commits or merge requests). The user can also specify a few other attributes to set on the new work item. This is useful for setting required attributes that would otherwise cause the save to fail.

If multiple issues have been selected the plugin will create multiple work items in the background and set the values from the Git issues as well as the attributes that were selected.

The plugin will attempt to save all the new work items when the user clicks "Close and Save". If the work items have required attributes that weren't set, the save will fail and a list will be shown above the work item editor containing all new but unsaved work items.

The user can then click on the new work items in the list and see the error that prevented the save from succeeding. After correcting the error and saving again the work item should be saved and removed from the list.

When any of the new work items created from Git issues are saved (whether right away by the plugin or after some editing and a save click by the user) a comment will be added to the Git issue with a link pointing to the new work item. The link will not be created if the user cancels the new work item instead of saving it.

Once all new work items have been saved a link will be provided at the top of the page to view the new work items. The link opens a temporary query that looks for all work items with the tag "from-git-issue" that were created by the current user on the same day.

Additional notes: This mode can be entered by creating a new work item and then clicking on the Git Connector plugin before making any changes to the work item.

As a more practical alternative, the plugin provides some files that can be added to the jazz theme that will extend the work item drop-down menu. The menu will then contain an entry for "Create Work Item From Git Issue".

Clicking this new menu option will navigate to the new work item page and automatically open the Git Connector plugin in the new mode.

MartinBenninger commented 6 years ago

This pull request was linked by RTC Work Item 655918 on behalf of martin.benninger@siemens.com

MartinBenninger commented 6 years ago

This pull request was linked by RTC Work Item 681763 on behalf of martin.benninger@siemens.com