P4DTG JIRA 6.X clickable URL proof of concept
Adding an example trigger script that will populate a job field with
any attached changelists in WIKI format. This could be replicacted to
JIRA 6.X which has the ability to render custom fields in WIKI format
making text (in this case changelist number and revision) clickable.
From top of file:
# Description:
# Example trigger script to write changelist and list of files that fixed job to a
# job field so they can be copied to JIRA by P4DTG. If this feeld is configured
# to render using the 'WIKI style' renderer. More information on this can be
# found in:
# https://confluence.atlassian.com/display/JIRA/Configuring+Renderers
#
# Important Note:
# This is only an example script to demonstrate how you could use P4DTG to
# replicate data and have it displayed as an active URL to p4web in JIRA.
# It has not been tested and is not ready to be installed in a production
# environment.
#
# Example usage:
# (1) Create a custom Text field in the Perforce jobspec.
# 135 P4WebURLS text 0 optional
#
# (2) Create a custom 'Free Text Field (unlimited text)' in JIRA and configure
# it to render with a custom renderer.
#
# (3) Modify 'jira-config.xml' and set the JIRA custom field to be
# type 'TEXT'. For example:
# <CustomField name="CustomTextField" type="TEXT" access="RW" />
#
# (4) Use P4DTG-Config to 'Check Connection' to the JIRA source, click
# 'Apply' then map P4WebURLS-->CustomTextField.
#
# (5) Test the trigger at the command line by output a job that has fixes
# to a text file, then running the script against this file. For
# example:
# p4 job -o job001234 > tmp.txt
# perl jira6_p4web_url_trigger.pl tmp.txt job001234
# After running the script 'tmp.txt' should contain the change and list
# of files in P4Web URL format.
#
# (6) Modify the environment section below to match your Perforce and
# P4Web settings.
#
# (7) Creat a 'form-out' trigger definition for the script.
# Triggers:
# jira form-out job "perl ./jira6_p4web_url_trigger.pl %formfile% %formname%"
#
#
#=====================================================================================
#
# EDIT THIS SECTION TO MATCH YOUR ENVIRONMENT
#
#=====================================================================================