Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Defining URL patterns for work items

Updated on May 31, 2022

Share your work items with users of the same application by defining URL patterns for the work items in your application, for example, cases, reports, landing pages, or other work items, such as sitemap.xml. Simple, meaningful URLs make collaboration more efficient for users. For example, they can bookmark a case for quick access, and then send a direct link to the case to other users.

Before you define URL patterns for work items, your application must contain a URL Mappings rule. Each application can have only one URL Mappings rule, whose name is always pyDefault. You define URL patterns by editing this rule.
  1. Create a URL Mappings rule in your application:
    Note: If your application already contains a URL Mappings rule, go to step 2.
    1. In the header of Dev Studio, click CreateTechnicalURL Mappings.
    2. In the Context section, in the Add to ruleset list, select the name and version of a ruleset to store the URL Mappings rule.
    3. Click Create and open.
    4. Click Save.
  2. In the navigation pane of Dev Studio, click Records.
  3. Expand the Technical category, and then click URL Mappings.
  4. In the list of URL Mappings instances, click pyDefault.
    Each application has only one valid URL Mappings rule, whose name is always pyDefault.
  5. On the Definition tab, expand the category of work items for which you want to define the URL pattern.
  6. Start configuring a URL pattern:
    • To modify a pattern, click the Switch to edit mode icon, as shown in the following figure:
      Switch to edit mode icon on the URL Mappings form
      URL Mappings form with the Switch to edit mode icon marked.
    • To add a URL pattern to a work item, click Add URL alias.
  7. In the Identifier field, enter a name for the URL alias that uniquely identifies it in all patterns in the rule.
    For example: Enter OpenWorkForReview.
  8. Optional: To generate a valid URL for an object, apply the URL pattern to the object:
    1. Select the Map path elements for URL generation checkbox.
    2. In the Class field, specify the class of the object for the properties mapping.
  9. In the Path element type column, select Constant.
    The first path element must be a constant.
  10. In the Value field, enter text that is a constant element in the URL pattern.
    For example: Enter Bug.
  11. Optional: To add more path elements to the URL pattern, click Add path element.
    1. To define text, in the Path element type column, select Constant and then, in the Value field, enter the text.
    2. To define a parameter, in the Path element type column, select Parameter.
    3. If you selected Map path elements for URL generation in step 8, in the Property mapping column, enter a clipboard property to map to the URL path element.
    Note: You can preview the URL pattern that you create below the Build resource path label, as shown in the following figure:
    Preview of a resource path and the configured path elements
    Define URL mapping dialog box with the resource path elements and a preview of the resource path marked.
  12. Optional: To make this URL pattern the default for objects in specific classes, in the Make this resource path the default for the following classes section, click Add class, and then in the text field, enter the name of the class.
    The class can be the same class that you entered in step 8, or any of the child classes.
    Note: The option is available only if you selected Map path elements for URL generation in step 8.
  13. Click Next.
  14. In the Edit processing activity dialog box, in the Class field, enter the class of the processing activity for the URL pattern.
  15. In the Activity field, specify the processing activity that controls running the URL.
    Result: The system identifies activity parameters and displays them in the table.
  16. In the Value column, enter the values for the processing activity parameters.
    Map your URL path elements (parameters) to the processing activity parameters. For example, in step 11, if you defined a URL path element as the {param1} parameter, in the Value field for an activity parameter, enter {param1}.
  17. Optional: To pass an additional parameter to the activity that the current activity invokes, click Add parameter, and then repeat step 16.
    For example: The following figure shows an additional parameter configured for the processing activity:
    Mapping a processing activity to the URL mapping
    Activity mapping dialog box with values configured for three parameters, including an additional parameter.
  18. Click Finish.
  19. Optional: To add a URL pattern to another category, expand the category, and then repeat steps 6 through 18.
  20. On the URL Mappings form, click Save.
For example: You can use the mappings to generate URLs that follow the patterns that you define by configuring a Copy shareable link button in a case. The following figure shows the results of the configuration at run time:
Copying a simplified URL for a case
Copying a direct link for a case by clicking the Copy shareable link button in the case.
For more information, see Theme-Cosmos: Open work object in Full portal on Copy sharable Link.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us