2 Working with Oracle Team Productivity Center

Work items are a representation of any Team Productivity Center artifact that a person can perform work on. Typical examples include program defect records, requirement database entries, test cases, project tasks and use cases, but work items are not limited to these. Any Team Productivity Center artifact can be represented and displayed if a suitable connector exists.

This chapter includes the following sections:

2.1 About Working with Oracle Team Productivity Center

The Oracle Team Productivity Center Work Items accordion contains nodes that connect teams to their information repositories, such as bug tracking databases, systems that log feature requests, project tracking information, and many other types of shared technologies that are used to track major projects.

Work items are the mechanism that Team Productivity Center uses to represent individual elements of the information repository. For example, the work items in a bug-tracking database would be individual bug reports; a feature repository's work items would be the individual feature requests tracked in that repository.

Work item nodes typically include such product development tools as:

  • Feature request tracking repositories, such as Atlassian's JIRA®.

  • Bug tracking databases, such as Bugzilla.

  • Project tracking software, such as Microsoft Project Server®.

  • Oracle Team Productivity Center's own Task Repository, for tracking the status, priority, and ownership of projects within Team Productivity Center.

Through Oracle Team Productivity Center, you can save context, make an active item and add details of source-control system checkins. You can create queries against these repositories and then build upon this information by creating relationships and assigning tags to the various work item elements that are important to the current part of the development process.

In addition, each work item has its own set of relationships, which it maintains to other work items both in its own repository (that is, of its own type) and, optionally, with work items of other types. For example, a bug database entry might be linked to the requirements tracking system; a feature enhancement request might link to a team milestone chart. These relationships will vary depending on the nature of the work and of the specific repositories you use with Team Productivity Center.

2.1.1 How to Support an Information Repository for Oracle Team Productivity Center

Here are the requirements for a particular information repository to become available as a work item node:

  1. An administrator needs to add the Team Productivity Center connector to the server.

  2. The end user needs to install and add the same Team Productivity Center connector as an extension to their copy of JDeveloper.

  3. Access to the repository has been set up for your team.

  4. The repository must be on line.

  5. If you have not previously done so, depending on permission requirements, you will need to log into the repository through the Oracle Team Productivity Center Manage Accounts dialog. For more information on connecting to a repository, see Section 3.3, "Making Repositories Available in Oracle Team Productivity Center."

Work items can be thought of as records, fields, or simply items of information returned from repositories in response to Oracle Team Productivity Center queries.

Typically, work items returned by a query are presented in a selectable, tabular format, as determined by the Oracle Team Productivity Center Connector.

The range of what you can do with information returned from the underlying repository is determined by the design of each repository's connector. In a typical use case, you can double-click to edit a work item, and then interact with the work item in ways defined by the connector author. It is recommended that connector developers duplicate the functionality and user interface of the repository as far as possible when developing a connector for use inside JDeveloper, providing the team with a consistent user experience and the functionality within the repository that the team desires.

2.2 Working With Work Items

Work items are elements of a data repository that encapsulate the data you are tracking in that repository (such as a bug report, which encapsulates the bug description, version numbers, and other information important to your product lifecycle management methodology).

Another way of looking at work items is to consider them the result of a query you have made to a data repository. Once Team Productivity Center returns the work item, you can interact with it in a number of ways.

2.2.1 How to Create and Use Work Items

Before accessing work items, you need to log into the associated repository, through the Manage Accounts dialog. Once in the repository, you can run a query to return specific records from that repository. If you double-click on an individual record, JDeveloper opens that record as a work item. For more information, see Section 2.5.2, "How to Run a Query."

After selecting one or more work items from the repository, you can perform the following operations on those work items that are part of the tasks you are performing:

  1. Link a change list to a work item when you check a file in to the version control system your team uses. This way, other team members who access the same work item will be able to refer to the change list, with changes and comments you have made. For more information, see Section 2.2.2, "How to Use Work Items with the Change List."

  2. Save the work item as your Active Work Item. This makes it easy to access the same work item (for example, a bug you are currently working to resolve) after you exit JDeveloper and re-enter later. For more information, see Section 2.2.3, "How to Set and Display the Active Work Item."

  3. Save the context (all open files, etc.) for this work item. This stores the application, files, and other hierarchical elements associated with the work item you are working on.

    You can save and restore context from any work item, not just the active work item. If you were last working on your active work item and closed JDeveloper, then on restart all your editors will open as they were when you closed. If you want to go to another work item (or if the last thing you did before closing JDeveloper was something other than working on your active work item), you can restore the context and quickly get back to where JDeveloper was when you last worked on that work item

  4. Choose Restore Context for a specific work item (either the active work item or any other for which you have saved context) to easily repopulate JDeveloper with the elements associated with the project you are working on through the work item you created. For more information, see Section 2.2.7, "How to Save and Restore Context."

  5. Add a work item to a tag list. For more information, see Section 2.6, "Working with Tags."

  6. Create a relationship to another work item. Section 2.7, "Working with Relationships."

2.2.2 How to Use Work Items with the Change List

When you commit files to your version control system, you can choose to associate them back to your version repository by linking the file to one or more work items. Alternatively, you can choose one or more other work items to associate the files with. The Changes tab on each work item lists the file (or files) associated with that work item.

When you open a work item, it may have checkin information stored with it. This allows you to see a listing of all the checkins done against that item (there may be multiple checkins over time), the details of each file included in the checkin, and any checkin comments.

To add files to a work item as a change list:

  1. In the Change List tab, select a list of files to be checked in and open the checkin dialog for your selected version control system.

  2. Select the work item to associate these files with.

  3. Check in these files to your selected version control system.

    The files will be listed on the Change List tab of the selected work item in Oracle Team Productivity Center.

JDeveloper stores the list of files with their checkin version ID, checkin date and any checkin comments written by the developer against each of the selected work items in the appropriate repository

2.2.3 How to Set and Display the Active Work Item

The active work item in JDeveloper is a work item that you have selected by clicking the Make Active command in the tool bar for the work item. You can also right-click on a work item in a list of work items returned by a query. You can select any work item as active at any time; only one work item can be active at a time, so making a new work item active replaces any previously selected active work item.

The Work Items accordion includes a link to the work item you have selected, above the list of repositories. This link remains after closing JDeveloper. If you shut down JDeveloper, the active work item link will appear above the Work Items accordion when you restart the IDE later. This gives you an easy way, much like a bookmark, of returning to an item that you expect to be working on as a high priority.

To display the active Work Item in JDeveloper:

  • Choose the link on the top portion of the work item accordion to open the active work item. To select an entry in the query result list, click the right mouse button and then choose Make Active to mark a work item as active.

JDeveloper retrieves the work item from the appropriate repository and displays the work item that you had previously set to be the active work item.

2.2.4 How to Connect to a Repository from Team Productivity Center

Note that your team may have one or more repository servers for the same Repository, with different values in the parameters. For example, there may be two mirror sites for the repository, based on geographical preference. Users can choose which server to connect to through the Manage Accounts dialog when they log in, but still maintain access to the same data repository.

To connect to a repository:

  1. Choose Team Navigator menu > Manage Accounts.

  2. Select one of the repositories under the Accounts column.

  3. From the Repository Server drop-down, select the preferred server for the repository you selected in the preceding step.

  4. Enter the login credentials (user name and password) for the server associated with this repository, and then click OK.

    You can also check the connection to the repository by clicking Test. This will allow you to verify the connection data and make changes if required.

2.2.5 How to Access Work Items through a Team Query

Team Productivity Center uses queries to access work items in the selected repository. Queries allow you to specify elements of the work item (for example, the bug status or range of ID numbers in a bug database repository) to return just the work item or range of work items you are interested in.

A team query is a query which has been set up by your administrator to be available to all members of your team. In addition to team queries, Team Productivity Center also lets you create user queries. For more information, see Section 2.5, "Working with Queries."

Once you are logged in, you use these queries to access individual work items from the available repositories. When you first begin working in Team Productivity Center, you will most likely not yet have created any user queries, but you might have team queries available. The following procedure assumes that your team administrator has saved a number of team queries for one or more of your repositories.

Before you can use a particular Work Item node, you need to log into the repository through the Manage Accounts dialog. If you have not logged into the repository, Team Productivity Center will instruct you to go to the Manage Accounts dialog if you try to access a work item before being logged in.

To access Work Items through a team query:

  1. Click on the + next to the repository's name to expand its listing in the Work Items accordion

  2. Click on the + next to Team Queries to expand the listing.

  3. Double-click on one of the team queries. JDeveloper displays the result of this query in the central pane.

Depending on the structure of the query, you may see a large number of work items displayed in the central pane. Scroll up and down to see the range of work items returned by the query you selected. Later, you can refine the results of this query to restrict (or expand) the number of work items returned. Additionally, you can create user queries of your own to help you focus on the specific kinds of work items that reflect your part of the project team.

You can also choose from a list of available operations on a query on the work item by right-clicking on the work item. JDeveloper displays a menu of operations specific to that query.

2.2.6 How to Associate Work Items with Project Files

You can associate work items with the files you are working on in a project when you commit the files in your selected version control system. When Oracle Team Productivity Center is active, the Commit dialog (or in some systems, the checkin dialog) contains an additional field from which you can specify work items to associate with the file when you commit your changes.

When using Oracle Team Productivity Center, the Commit dialog for your selected version control system will include the following optional capabilities designed to support Oracle Team Productivity Center's work items. For help at any time on your software's Commit dialog, click Help or press F1.

To associate work items with project files:

  1. Commit your changes from the project file(s) you are working on, in the selected source control management system. For example: Team > Subversion > Commit.

  2. Select Associate with work items from the Commit dialog.

    To associate an Oracle Team Productivity Center work item with the file or files being committed, click on the green + sign above the Associate with Workitems panel of the Commit dialog. This lets you choose a work item from the Select Work Item dialog.

    The Associate with Worktems panel of the commit or checkin dialog displays four columns of information about each work item you add:

    Table 2-1 Commit dialog options for Team Productivity Center work items

    Column Description

    Repository

    The repository in which the work item is stored. You must have that repository's connector installed in order to access the work item

    Type

    The type of work item. This is dependent on the repository in which the work item is stored. For example, work items in the Task repository are of type Task; other repositories may have additional types. See the documentation on the specific repository or connector for more information

    ID

    The work item's ID—for example, a bug number or feature request ID.

    Subject

    The subject of the work item, imported from the repository in which the work item is stored

    If you associate more than one work item with the file or files being committed, you can move selected work items up and down in the list by selecting the work item and then clicking the Move Up icon (double upward arrows).


    If you associate more than one work item with the file or files being committed, you can move selected work items up and down in the list by selecting the work item and then clicking the Move Up icon (double upward arrows).

  3. When you are finished, click on Commit.

To remove a work item's association from a file:

  1. Commit your changes from the project file(s) you are working on, in the selected source control management system. For example: Team > Subversion > Commit.

  2. Select the work item from the list, and then click on the red X.

    The work item is deleted from the Commit dialog immediately. If you delete a work item in error, add it back.

  3. When you are finished, click on Commit.

2.2.7 How to Save and Restore Context

Sometimes, the process of development involves having a number of files and windows open in JDeveloper—for example, while developing Java classes and visualizing those classes in a diagram. The challenge can be to remember which files and windows are open for any given task, especially if it becomes necessary to close JDeveloper, or to switch to another project with its own set of files.

Team Productivity Center addresses this issue through the ability to save and restore context for work items. If you are logged into Team Productivity Center and are tracking the task through a Work Item, Team Productivity Center lets you save the context of those files and IDE layout against that work item, using Save Context. Finally, you can delete a saved context when that phase of the project is done.

Later, you can return to that set of files and layout (for example, if you are working on multiple tasks concurrently) using Restore Context.

To save context for a work item:

  1. Open a work item.

  2. Select the Save Context icon. This saves the state of JDeveloper against the specific Work Item you are editing.

To restore a previously saved context:

  1. Open a work item.

  2. Select the Restore Context icon. This returns the IDE to the saved state for that work item.

    In addition, you can click the right mouse button on an entry in the query result list and then choose Restore Context.

To delete a saved context:

  1. Open a work item.

  2. Select the Delete Context icon. This removes any saved context from the work item.

2.3 Working with the Task Repository

The Oracle Team Productivity Center Task repository contains work items intended as a shared "to do" list for your Oracle Team Productivity Center team. The Task repository is installed when you install the Team Productivity Center server. When Team Productivity Center shows a list of Task work items, the display contains the following columns:

Table 2-2 Task work item fields

Column Header Description

Task ID

A unique identifier for this work item in the Task Repository

Task Name

The name given to this task

Assigned To

The owner of this task

Priority

The relative importance assigned to this task. Values can be High, Medium, Low or None

Status

The current status of this task. Values can be Assigned, Blocked, Done, or In Progress

Start Date

The date on which this task began.

End Date

The date on which this task is to end.


You specify or change the values that appear in each column when you create or edit a Task work item. See Section 2.3.2, "How to Create a Task Work Item."

2.3.1 How to Find Tasks in the Task Repository

As with other work item repositories, you query the Task Repository to return one or more work items that match your query terms.

To query the Task Repository:

  1. Select Task > My Queries (or Task > Team Queries).

  2. Double-click the query you wish to run.

Oracle Team Productivity Center displays the work items which match the query you entered. For example, to display a list of all Task work items in the repository, create a query that returns Task work items with a Task ID greater than or equal to 1.

For more information about creating and working with queries, see Section 2.5, "Working with Queries."

2.3.2 How to Create a Task Work Item

You create a Task work item from the Work Items accordion.

To create a Task work item:

  1. In the Work Items accordion, right-click Task, and then select New Task. This opens the Task work item editor.

  2. Enter the information for the task in the fields. For more information about any of the fields in the Task work item, press F1 at any time.

  3. When you are finished, select File > Save.

The next time you view all available Task work items, the newly created Task will be visible in the Work Item pane. For more information, see Section 2.2, "Working With Work Items."

2.3.3 How to Edit a Task Work Item

You can edit any Task work item visible in the Work Item pane, after running a query to return the Task work items of interest to you. For example, if you have recently completed work on a Task work item, you can change the Status field to Done.

To edit a Task work item:

  1. In the Work Item pane, locate the Task work item you wish to edit.

  2. Double-click the selected work item. This opens the Task work item editor.

  3. Enter the information for the task in the fields. For more information about any of the fields in the Task work item, press F1 at any time or click the Help icon.

  4. When you are finished, select File > Save.

The next time you view all available Task work items, the updated Task will be visible in the Work Item pane. For more information, see Section 2.2, "Working With Work Items."

2.4 Working with Attachments

Team Productivity Center lets you add attachments to work items, as long as the work item's connector supports it. For example, if you build a jar file on your local system as part of testing a bug fix, you can attach the local jar to the bug report. Your QA staff can then download the attachment and test your fixes. Your user-experience team can attach graphics showing their design for the layout of an application's screens and dialogs, making it simpler to design the interface in JDeveloper. And because these attachments are available to any kind of work item, you can tag the work items or define relationships to make it easier to keep track of your work.

Some repository connectors support attaching any type of document (such as test cases, snippets of code, screenshots, specifications) or Web link to a work item. It is up to the connector writer to indicate whether attachments are supported and if so, to store the documents in a document repository and return them to Team Productivity Center. For more information, see Chapter 4, "Working with Oracle Team Productivity Center Connectors."

If attachments are supported by a work item repository, the work item displays an Attachments tab. Clicking on that tab displays all attachments that have been attached to the work item already. Double-clicking on an attachment either launches the default application associated with it, or saves the file locally. Users also have the ability to add new attachments to the work item by selecting a local file on the system to upload. Depending on the document store's permission settings, you may also be able to delete documents attached to work items. Because these documents are attached to the work item, this means that all Team Productivity Center users who access the work item can view the attachments.

Attachments can be files from your local file system or your local network, in which case the file contents are uploaded to a document repository specified by the connector author. Because these references are attached to the work item, this means that all Team Productivity Center users accessing the work item can view and download the attachments. The details of uploading and downloading depend on how the connector has been defined; connector authors are encouraged to use the standard file browser interface for uploading and downloading attachments.

In addition, work item attachments can be links to content on the Web. Adding an attachment of this type adds the URL to the work item; to view the destination of the URL in a work item you are viewing, click on Download Attachment.

2.4.1 How to Add Attachments

You add attachments to a selected work item.

To add an attachment to a work item

  • Select Work Item view > Attachments tab > Add Attachment icon

This opens the Add Attachment dialog, with which you can save a file or link to the work item.Attachments can be one of the following:

Document File

Select the file icon to open a file system browser. Browse to the desired file, then select Save.

Web link

Attach a URL to this work item. Enter the following information for the URL you wish to save as an attachment:

  • Name: The name that you wish to appear in the Team Productivity Center work item.

  • Link: The URL you wish to associate with this name.

When you have specified the file or URL to use as the attachment to this work item, select Add.

2.4.2 How to Download Attachments

You can download attachments from a work item in Team Productivity Center to your local workstation. You can then save it or open it with the associated program (for example, a text editor or PDF viewer).

To download an attachment:

  • Select Work Item view > Attachments tab > Download Attachment icon.

This opens the Download Attachments dialog, from which you can make the attachment available for viewing or editing locally. Select one of the options from the dialog:

Open Attachment

Opens the attachment in the appropriate editor or application. For example, if you download a text file, JDeveloper opens the current default text editor (for example, WordPad).

Save Attachment

Copies the attachment to your local file system. Select this option, then select the file icon to browse to the location in your local file system where you wish to save the attachment.

2.4.3 How to Update Attachments

You can update an existing attachment when there is new content available to share with the team.

To update an attachment with new content:

  • Select Work Item view > Attachments tab > Update Attachment icon.

This opens the Update Attachment dialog, which you can use when the content of the attachment has changed since the last time you accessed it. For example, if the attachment is a text file containing minutes of a meeting on the issue, use Update Attachment to copy the newest minutes to the work item.

When you select Update Attachment, JDeveloper opens a file browser dialog from which you can select the file to update. Browse to the file, then select Save.

Note:

You can only update a file with the same name. For example, if the minutes of your design meeting are dated with the month and date (such as minutes_jan_15.txt), you will not be able to update the attachment with the minutes from the following week (in this example, minutes_jan_22.txt).

2.4.4 How to Rename Attachments

You can rename an attachment that has already been uploaded.

To rename an attachment:

  • Select Work Item view > Attachments tab > Rename Attachment icon.

This opens the Rename Attachment dialog, from which you can change the name of the attachment associated with the work item.

This dialog contains the following fields:

Type

The type of attachment (File or URL) represented by the selected attachment.

Old Name

The existing name of the selected attachment.

New Name

The name to which you wish to change the attachment.

When you are finished, click OK.

2.5 Working with Queries

Queries are the way Team Productivity Center retrieves work items from the repositories to which you are connected. As you work with Team Productivity Center, you will have the opportunity to work with team queries that your administrator (or another team member) has created to cover common situations. For example, your entire team would benefit from a team query that searches a bug database and returns all open items assigned to the project or product the team is working on.

In addition, you can create custom queries that apply specifically to your work. For example, a query that searches the same bug database and returns all open items assigned to you could help you manage your workload effectively.

In either event, the result of the queries in these examples will be a list of records extracted from the bug database, presented in Team Productivity Center as a list of work items. Other queries from different repositories might return records from a feature tracking list, from a schedule management program, or from any other repository you and your team use. Once the query returns these work items, you can then interact with them in the various ways that Team Productivity Center offers.

2.5.1 How to Create Queries

Oracle Team Productivity Center lets you create two types of query: user queries and team queries. User queries are those you create to solve a specific problem that you are facing—for example, to find bugs in a specific date range, or filed by an individual team member if you are taking over another member's tasks. You can easily create specific user queries to solve these and other immediate needs.

If you find that you are regularly searching for the same kind of work item, you can save your user query rather than modifying an existing one. For example, if you are tracking bugs on different branches of the same product, you can save user queries for each branch individually and retrieve work items that match each query as needed.

Additionally, some queries may be general enough that they can be used by multiple team members. For example, the entire team might want to view bugs filed as a result of a usability session or beta program. Queries with a wide application such as these, which apply to more than one user, are saved and accessed as team queries. Depending on the Team Productivity Center administrative rights you have, you may be able to save team queries.

To create a query:

  1. Select a repository and create a query for it, returning fields and information of interest to you.

  2. Review the results of that query, editing the settings as required.

  3. Save the query for later use. When you use the query again, it will return the same fields from the repository but with updated information.

  4. If you have administrative privilege and the query is general enough to be of use to the entire team, save it as a Team Query.

2.5.2 How to Run a Query

Running a query from Team Productivity Center gives you access, within JDeveloper, to the resource for which the query returns results. In a bug database, for example, running an Oracle Team Productivity Center query can return all bugs matching the criteria of the query you run. This simplifies tracking bugs, fixes, and features compared to using separate applications in multiple windows.

To run an existing query:

  1. Double-click on the Work Item Node that contains the query you want to run. (Alternatively, click on the + to the left of the node.)

  2. Open either Team Queries or My Queries (if a "+" doesn't appear adjacent to the Queries icon, it means no queries are available).

  3. Double-click on an available query (such as Open Bugs). (Alternatively, right-click on the Query and choose Run.) The query results should appear in a tabbed panel named for the query.

Note:

For any returned results, you can double click on the returned row to view details and make modifications and add comments to the extent supported by the Oracle Team Productivity Center Connector for the particular repository you are accessing.

2.5.3 How to Customize a Query

In Oracle Team Productivity Center, queries are easy to customize, even if you start with a pre-existing team query. The key to this customization potential is that data fields that are made available from the underlying repository can be used in two ways:

  • To apply additional fields to the underlying information.

  • To tailor the resulting on-screen report.

For example, a team query might provide the following fields:

  • Product

  • Type

  • Status

As the development process draws to a close, you may find it useful to add Priority as a filtering element.

Here is a simple example of how an existing query can be enhanced by adding an additional query field filter. In this example, we're creating a query on a defect repository, specifically a query that returns defects that do not have the priority of "Blocker."

To add an additional query field filter:

  1. Click the green + icon to add a new criteria line.

  2. With the Query Results tab open, click any dropdown on the far left of the query to see a list of available fields.

    Note:

    You can choose a field element that is already in use. For example, you could add a second Project field element to get a report on two projects.

  3. In the leftmost field dropdown, select Priority.

  4. Change the Not Equals dropdown to Equals.

  5. Choose Blocker from the rightmost dropdown.

  6. Click Search.

To clear the field option selections you have made before saving the query, select Clear from the More Actions dropdown menu. To clear all the entries, select Restore.

The query returns the results that match the criteria you entered.

Tip:

You can sort the results by any column simply by clicking on the column name. In addition, the widths of the columns and the currently sorted columns will be saved when you save the query

Once you have created a custom query, you can save it.

2.5.4 How to Rename a Query

You may wish the change the name of a query to reflect other modifications or customization you have made to it.

To rename a query:

  1. Click on More Actions > Save As.

  2. Enter the new name for the query in the Name field.

  3. If desired, change the visibility of the query:

    To make the query visible to the entire team, select Team.

    To make the query visible only to you, select User.

  4. Click OK.

The query will now be available with the name you entered.

2.5.5 How to Save a Modified Query

Some Team Productivity Center queries have a life span of a single use. For example, you may wish to query your repository for a single bug record that had been filed in error, so that you can correct it. Once the bug entry is fixed, you may never need to run that query again.

Other queries, however, may be useful on a regular basis, either to you or to your team members. For example, you may have a query that searches the bug database for all bugs that have your name and are not closed, sorted in reverse chronological order, for a specific combination of product areas. This is a query you might conceivably use every day. In such cases, saving the query lets you choose it again in the future.

To save the new or changed query:

  1. Click the More Actions button on the right side of the screen report.

  2. Select Save As.

  3. Pick a name for your query, such a Open Blocker Bugs.

  4. If you have team administration privileges, you will have a choice of creating a Team Query or a User Query. If not, you will only be allowed to create a User Query. In either case, for this example, choose User Query and click OK.

If you have team administration privileges and the query you are saving would be useful to all the members of your team, you can also save it as a Team Query.

Note that all queries are saved against the current team. Even if you have access to this repository from multiple teams, queries are saved in the scope of the current team.

2.5.6 How to Create a Team Query

If you have team administration privileges, you will likely want to create team queries based on the projects your team is working on and the status of the projects. For example, towards the end of a project, creating a query around Priority 1 bugs with a description that includes the phrase "stop ship" might be a useful addition to the set of queries available to the team.

The option to save a team query only appears if you have team privileges. If you find that you are frequently creating queries that other members of your team would find useful, ask your Team Productivity Center administrator to grant you team privileges. For more information, see Chapter 3, "Working with Oracle Team Productivity Center Administration."

To save a new team query:

  1. Click the More Actions button on the right side of the screen report.

  2. Select Save As.

  3. Pick a name for your query, such a Open Blocker Bugs.

  4. If you have team administration privileges, choose Team Query and click OK.

2.5.7 How to Delete a Query

Only users with a role that allows them to modify team queries can delete team queries. In the default roles used by Team Productivity Center, this includes users with roles of Team Administrator and Group Administrator.

To delete a query you created:

  1. In the Oracle Team Productivity Center panel right-click on the query you want to delete.

  2. Select the Delete option, then answer Yes to the verification dialog.

2.6 Working with Tags

In addition to connecting to individual work item repositories, Oracle Team Productivity Center provides a tagging mechanism that allows you to tag work items from multiple repositories for additional integration. You can then view items from across your repositories by querying the repositories for tags you have set on work items; Team Productivity Center will display work items with those tags, regardless of which repository contains them.

A key distinction between tagged work items and work items returned by a query is that the query searches through the entire repository, finding and returning items that match the query terms (for example, a range of bug IDs or the owner of a feature enhancement request). Tagged work items, on the other hand, are work items you have already identified and specifically tagged for a particular purpose. Or considered functionally: you use a query to return a list of work items that match a particular search term; once you have that list, you can tag the individual work items that you are specifically interested in.

Team Productivity Center uses two kinds of tags:

  • Team tags, set up by your team or group administrator, are available for use by all members of the team. Each team's tags are unique to that team, not shared among other teams. If you work on more than one team, the administrators of the various teams may use different tags (though they may also choose to use the same tags, particularly if your organization uses company-wide tags for bug tracking, feature requests, etc.)

  • Private tags, which you define on your own, help you find, sort, and group work items by project, by urgency, or by a specific section of the code. For example, you might choose to set up a tag for use in a bug database for bugs where you have fixed the code and checked it in, but not yet verified the fix in a product build. You can tag the appropriate work items—entries in a bug-tracking database, in this example—with this private tag each time you've checked in the fixes for that work item's issue.

Once you tag a number of work items, you can return a list of work items that you have identified with a specific tag. Creating a tag, as described here, for items you've fixed but not verified could greatly simplify verification of your assigned bugs once the next build of the product is available, because you can query the work item repository for all items that use this tag.

2.6.1 How to Create, Modify, and Delete Tags

You can create tags by using the Manage Tags dialog. If you are a team administrator, you have the choice of creating team or user tags; if you do not have administrative privileges, you can only create user tags. Administrators and non-administrators alike can apply tags to work items.

To create a new tag:

  1. Select the tag icon from the Work Item accordion toolbar in the Team Navigator.

  2. Select Manage Tags.

  3. In the Manage Tags dialog click the green plus button.

  4. Enter a name and description for the tag

  5. If you are a Team or Group Administrator, select the visibility for this tag:

    • Team: all members of the team can view and query by this tag. (Option available to administrators only.)

    • User: only you can view and query by this tag.

  6. Click OK.

To modify a tag:

You can modify any tag to which you have access, changing its name, description, and (if you have sufficient privileges) scope of visibility.

  1. Locate the Work Items accordion in Team Productivity Center.

  2. Click the Tag icon, selecting Manage Tags.

  3. In the Manage Tags dialog, select the tag you want to change.

  4. Double-click the field you wish to modify and make the necessary changes.

  5. Click OK.

To delete a tag:

  1. Locate the Work Items accordion in Team Productivity Center.

  2. Click the Tag icon, selecting Manage Tags.

  3. In the Manage Tags dialog, select the tag you want to delete.

  4. Click the red X to delete the selected tag.

  5. Click Yes to confirm the deletion.

2.6.2 How to Use Tags

Work items artifacts can be tagged with existing keywords. For example, bugs in a product under development may be tagged by a project manager as Hot, Warm, EOD (end-of-day), or Deferrable.

Note:

These tag names are just examples. You and your team can devise a tag naming scheme that best matches your tasks and work style.

In addition, artifacts in other work items can also be tagged with the same terms. For example, a Jira feature could be tagged Hot. In such a case both the bugs and the feature request would show up if you look at the list of work items tagged as Hot.

You use tags by applying them to work items.

To apply a tag to a work item:

  1. Open the repository containing the work item you wish to tag—for example, a bug database.

  2. Double-click the work item to be tagged, and then select the Tags tab.

  3. Click the green + icon to add a tag. This opens the Apply Tags dialog.

  4. Select the tag you wish to apply to this work item, and then click OK.

Once you have applied tags to work items, you can view work items by the tags you have applied to them.

If the tag you want to apply does not already exist in the Apply Tags dialog, click on Manage Tags to open the Manage Tags dialog and create a new tag. See Section 2.6.1, "How to Create, Modify, and Delete Tags."

To view work items associated with a particular tag:

  1. Select the tag icon from the Work Item accordion toolbar in the Team Navigator.

  2. Select Query by My Tag to select a private tag, or select Query by Team Tags to select a team tag.

  3. Select a tag name from the dropdown list.

A JDeveloper window will open, showing the items whose tags match the name you selected. This window shows the results of a cross-repository search for tagged work items, essentially returning all work items to which you or another team member (in the case of team tags) has assigned the tag on which you are querying. To get a list of tagged items for just one repository, right-click on the repository.

To search for tagged work items in a specific repository:

  • Click the right mouse button on the repository you wish to search. This brings up a context menu with the following options.

Table 2-3 Options while searching for tagged work items

Option Description

Query by ID

Look through this repository and return the work item with the single ID you are looking for. The query will return the specified work item; to view tags associated with that work item, click the Tags tab of the work item display.

Query by My Tag

Displays a list of your tags, from which you can select the tag you wish to use for the query.

Query by Team Tag

Displays a list of team tags from which you can select the tag you wish to sue for the query.

New Query

Opens the New Query pane in JDeveloper. See Section 2.5.1, "How to Create Queries."

New <work item>

Opens a pane in JDeveloper from which you can create a new work item of the type associated with the selected repository. For example, in the Task repository, this menu selection will say New Task. To obtain more information about the specific repository, click inside one of the fields in the New Workitem pane and press F1.

Refresh

Updates the display of the selected repository in the Work Items accordion.


2.7 Working with Relationships

A relationship is an association between work items, which can either be in the same repository or in different repositories. It provides a way to relate two work items together. You can navigate to what is related to the current work item, and to the work item from the elements related to it.

Because relationships cross repositories, you can establish a relationship between, for example, a defect-tracking system and a customer request database; the relationship means that the work items in the two repositories will refer to each other, so that team members who view the defect-tracking entry will be able to track down the customer request as well.

Relationships cross the entire team. For example, you could create a relationship between a bug and an item in the Atlassian Jira feature request tracking repository. Once you create the relationship, anyone from any team who opens that bug will see the relationship with the Jira work item. However, team members who don't have that Jira repository in their connectors will not be able to open the work item.

2.7.1 How to Add a Relationship to a Work Item

You add a relationship to a work item through the Add Work Item Relationship dialog. This dialog displays a list of work items from which you can select the ones for which you wish to create a relationship with the work item you have selected.

To add a relationship to a work item:

  1. Select the work item to which you wish to add a relationship.

  2. Click on the Add drop-down (the green +). This displays the work item relationship context menu, which lets you determine how to sort and display the available work items for the relationship you are adding. See Section 2.7.3, "How to Associate a Relationship with a Work Item."

  3. Select an option from the context menu. The Add Work Item Relationship dialog is displayed.

  4. Click on the work item (or work items) for which you wish to create a relationship with the item you selected, and then click OK.

2.7.2 How to Delete a Relationship

You delete a relationship from a work item with the Delete button (the red X) from the work item tool bar.

To delete a relationship from a work item:

  1. Select the work item from its repository.

  2. Click on the Relationship tab.

  3. Select the relationship that you wish to delete, and then click Delete (the red X).

  4. When the Delete Tag from Work Item dialog asks you to confirm, click Yes.

The relationship is deleted.

Note that the work item referred to by the relationship is unchanged. You can add other relationships using that work item as required.

2.7.3 How to Associate a Relationship with a Work Item

When you add a relationship to a work item, the Create button (the green +) displays a context menu that lets you select how to sort, display and select other work items for the relationship. This context menu contains the following selections:

By My Tags

Displays a list of your user tags. When you select a tag from the list, the Add Work Item Relationship displays all work items that have been tagged with the selected user tag.

To select one of these tagged work items for the relationship, click on the work item from the Add Work Item Relationship, and then click OK.

To select more than one tagged work item, hold down the Control key and click any additional work items (Ctrl+Click).

By Team Tags

Displays a list of your available team tags. When you select a tag from the list, the Add Work Item Relationship displays all work items that have been tagged with the selected team tag.

To select one of these tagged work items for the relationship, click on the work item from the Add Work Item Relationship, and then click OK.

To select more than one tagged work item, hold down the Control key and click any additional work items (Ctrl+Click).

By Opened Work Items

Displays a list of all the work items you currently have open in JDeveloper. To select one of these open work items to use in the relationship, click on the work item from the Add Work Item Relationship, and then click OK.

To select more than one open work item, hold down the Control key and click any additional work items (Ctrl+Click).

By Active Work Item

Creates a relationship between the selected work item and the active work item. See Section 2.2.3, "How to Set and Display the Active Work Item."

If the work item you have selected is the active work item, this menu option will not be available.