How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Div |
---|
| Estimated Time: 1 min |
In this step, you will be defining a user defined substitution variable for the Run CLI Actions in JIRA add-on. By defining this information once as a user defined substitution variable, you can re-use it on workflowd workflows or the Run CLI Actions screen to tell it how to connect to your HipChat instance. Log on to your JIRA instance as a JIRA Administrator and do the following: - From the Cog menu (), choose Add-ons.
- In the Run CLI Actions in JIRA section of the left navbar, click Configure. The Configure Run CLI Actions in JIRA screen will be displayed.
- Define a new entry with the parameters set as shown to the right.
- The Name parameter defines the name of the entry, which you will later reference when running a CLI action from a workflow (as in this recipe) or the Run CLI Actions screen.
- The Value parameter defines how to access your HipChat instance.
- Replace
<URL> with the URL to your HiipChat HipChat instance. - Replace
<TOKEN> with the token of the HipChat user you want to "own" the HipChat room that will be created when a Highest priority ticket is opened.
- Click Save to save the user defined substitution variable.
| User Defined Substitution Variables:Name | hipchat | Value | --server <URL> --token <TOKEN> --autoWait |
Configure Run CLI Actions in JIRA screen, after defining new variable:
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Create a JIRA project to use with this recipe Div |
---|
| Estimated Time: 1 min |
In this step, you are going to create a project you will use when making and testing the workflow change that creates a HipChat room. - From the Projects menu, choose Create Project.
- In the Select Project Type screen, select Simple Issue Tracking and click Next.
- The second screen shows the Issue Types that will be used (Task and Sub-task). Click Select.
- The third screen prompts you to supply a Name and Key for your new JIRA project.
- Use Run CLI Actions in JIRA as the Name.
- Use RCAIJ as the Key.
- Click Submit to create the project, with you set as its Project Lead.
- If you click Create and choose Run CLI Actions in JIRA as the Project and Task as the Issue Type, you will see a Create Issue screen like the one shown to the right. Only 3 fields (Project, Issue Type, and Summary) are required, as indicated by the red asterisk next to their field labels. There are 2 optional fields: Priority and Description. Click Cancel to close this screen.
| Create Issue screen: Expand |
---|
title | View all screens for the Create Project wizard... |
---|
| First screen:
Second screen:
Third screen:
|
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Add Assignee to the Create screen Div |
---|
| Estimated Time: 1 min |
By default, the project is configured to set the default Assignee to "Unassigned." In this step, you will add the Assignee field to the Create screen to ensure it can be input if desired. - From the Cog menu (), choose Projects.
- Click the Run CLI Actions in JIRA link to display the Project Summary page which shows how the project is configured.
- In the left navbar, click Screens to go to the Screens page.
- Next to the "Create issue" operation, click the RCAIJ: Simple Issue Tracking Create Issue Screen link to open the Configure Screen for this project's Create screen.
- In the dropdown at the bottom of the screen, select Assignee.
- Click and drag the grab bar to the left of the Assignee field and drag it above the Attachment field. Your screen should now look like the screenshot shown to the right.
- Click the Image Removed the Back to project: Run CLI Actions in JIRA button to return to the Screens page.
| Configure Screen, after adding the Assignee field:
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Create a draft workflow Div |
---|
| Estimated Time: 1 min |
In this step, you will edit the workflow used by the Run CLI Actions in JIRA project so you can begin the process of adding the Run CLI Actions post function that will create a HipChat room when a Highest priority ticket is opened. - In the left navbar, click Workflows to go to the Workflows screen.
- Click the pencil icon () in the Operations column next to the RACIJRCAIJ: Simple Issue Tracking Workflow link to edit that workflow.
- Click the Image Removed the Text button so that the workflow is shown in Text mode rather than Diagram mode.
- Click the To Do link in the Step Name column . The to display the Step: To Do screen is displayed.
- Click the Create link shown to the left of the To Do step to open the Transition: Create screen.
| Step: To Do screen:
Transition: Create screen:
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Add a post function on the Create transition Div |
---|
| Estimated Time: 1 min |
In this step, you will add a post function on the Create transition. In a later step, you will configure this post function. From the Transition: Crreate Create screen, do the following: - Click the Post Functions tab to display the post functions. Your screen
- Click the Add post function link to display the "Add Post Function To Transition" screen.
- Select CLI action and then click Add.
- The Add Parameters To Function screen will be displayed.
| Transition: Create screen, before any changes:Image RemovedAdd Post Function To Transition screen:
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Configure the post function, part 1 Div |
---|
| Estimated Time: 3-4 min |
In this step, you will begin configuring the post function you just added to the Create transition so that tickets of the highest priority will trigger the creation of a HipChat room. From the Add Parameters To Function screen, do the following: - Set the parameters as shown to the right.
Condition 1 indicates that the post function should be executed only when the ticket being created as a Priority = Highest.
Note |
---|
title | Highest vs. Blocker priorities |
---|
| Beginning with JIRA 6.4, the highest priority is now named Highest. In earlier versions, it was named Blocker. If you are using a version of JIRA earlier than 6.4, please substitute "Blocker" wherever you see "Highest" in this recipe. You might want to view the priority values defined in your instance to ensure you are specifying the correct and exact name. Please note that this name is case sensitive when supplying it in the post function parameters. |
- Product indicates that HipChat CLI commands will be executed.
- Action indicates that the
run action will be executed so that multiple commands (as defined in the Data parameter) can be invoked. The Value you provided for the hipchat variable defined on the User Defined Substitution Variables screen in step 1 will be substituted for %variable_hipchat% . The --continue variable is needed to avoid an error in case no Assignee is chosen on the Create screen.
- Data defines the commands to be invoked, with each appearing on their own line.
- Line 1 creates a new private HipChat room with a name that contains the key of the issue and a description that indicates it is to be used to discuss the ticket.
Line 2 adds the reporter as a member to the new HipChat room and Line 3 adds the assignee as a member of the new HipChat room. For both of these, "@" must be inserted prior to the %original_reporter% substitution variable if the JIRA username matches the @mention name of the HipChat user. This is unnecessary if the JIRA username matches the HipChat username.
Info |
---|
The Simple Issue Tracking Workflow, by default, uses "Unassigned" as the default Assignee. Because of this, if the user neglects to select an Assignee when creating a new issue, "" (the value after the substitution occurs) will be used as the value for --name. Since this is not a valid name for any HipChat user, Line 3 would error if not for the --continue specified in the Action parameter. |
- Line 4 writes an initial message to the room to reiterate its purpose to the members and ask that they add others to the room as appropriate.
- Notes is an internal comment that serves to document what the post function does.
- Click Add to save your changes to the parameters and add the Create Issue post function. You will be returned to the Transition: Create screen.
- Your screen should now look like the screenshot shown to the right.
| Post Function parameters:Condition 1 | | Product | HipChat | Action | --action run %variable_hipchat% --continue | Data | Line 1: --action createRoom --room "%original_key% Room" --topic "Discussion of %original_summary%" --access "private" Line 2: --action addRoomMembers --room "%original_key% Room" --name "@%original_reporter%" Line 3: --action addRoomMembers --room "%original_key% Room" --name "@%original_assignee%" Line 4: --action sendMessage --room "%original_key% Room" --message "This is a private room intended for discussion about this Highest priority issue created on %original_created%: %original_key%. Please add others to this room as appropriate." | Notes | This post function creates a new HipChat room for any new Highest priority ticket so that any conversation about it can be centralized and communicated to interested parties. |
Transition: Create screen, after adding the Create Issue post function:
|
|
| Configure the post function, part 2 Div |
---|
| Estimated Time: 1 min |
In this step, you will complete the configuration of the post function by moving it so that it is executed after the new issue is created. You will then publish the workflow so you can test it. From the Transition: Create screen, do the following: - Repeatedly click the Down Arrow icon () next to the CLI Action post function until the post function is below the "Creates the issue originally" post function. This will ensure the new issue is created before the CLI Action post function is executed.
- Your screen should now look like the screenshot shown to the right.
- Publish your draft workflow by clicking the Publish Draft button at the top of the screen. The Publish Draft Workflow screen will appear.
- When prompted whether to save a backup copy, click Yes and then click Publish.
| Transition: Create screen, after moving the CLI Action post function:
Expand |
---|
title | View the Publish Draft Workflow screen... |
---|
| |
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Test the post function, part 1 Div |
---|
| Estimated Time: 2-3 min |
In this step, you will verify the post function is working as intended when assigning the newly created issue to a specific user. - Click the Create button to create a new issue. The Create Issue screen will appear.
- Fill in the fields as shown on the right and click Create. A popup window similar to the one shown on the right will appear to confirm the issue was created.
- Log on to HipChat as the user whose token was specified in the User Defined Substitution Variables in step 1, go into the new room, and you should see a screen like the first screenshot shown to the right.
- Log on to HipChat as the same user who created the issue (the Reporter). You should be able to see the room, looking similar to the second screenshot shown to the right.
- Log on to HipChat as the same user to whom the issue was assigned (the Assignee). You should also be able to see the room shown in the second screenshot to the right.
| Create Issue fields:
Project | Run CLI Actions in JIRA (RCAIJ) | Issue Type | Task | Summary | System crash due to xxx | Priority | Highest | Assignee | <Select some other user defined in your JIRA and HipChat instances> |
Popup confirmation screen:
HipChat Room created for the new issue (Admin's view):
HipChat Room created for the new issue (Participant's view):
|
|
How to Create a HipChat Room to Communicate About a HipChat Rooms for High Priority Ticket Discussions | Test the post function, part 2 Div |
---|
| Estimated Time: 2-3 min |
In this step, you will verify the post function is working as intended when not specifying an Assignee for the newly created issue. - Click the Create button to create a new issue. The Create Issue screen will appear.
- Fill in the fields as shown on the right and click Create. A popup window similar to the one shown on the right will appear to confirm the issue was created.
- Log on to HipChat as the user whose token was specified in the User Defined Substitution Variables in step 1, go into the new room, and you should see a screen like the first screenshot shown to the right.
- Log on to HipChat as the same user who created the issue (the Reporter). You should be able to see the room, looking similar to the second screenshot shown to the right.
With this approach demonstrated in this recipe, you are able to ensure your highest priority issues are effectively resolved, with all interested parties kept informed! | Create Issue fields:
Project | Run CLI Actions in JIRA (RCAIJ) | Issue Type | Task | Summary | System is non-responsive | Priority | Highest | Assignee | <Leave set to Automatic> |
HipChat Room created for the new issue (Admin's view):
HipChat Room created for the new issue (Reporter's view):
|