Jira Connector
Documentation
Version: 11
Documentation
Endpoint

Update Issue


Name

update_issue

Description

No description available

Related Tables

Issues

Parameters

Parameter Label Required Options Description
IssueIdOrKey IssueIdOrKey NO Enter Issue ID or Key
NotifyUsers NotifyUsers NO
Option Value
true true
false false
Whether a notification email about the issue update is sent to all watchers. Possible values: true, false
OverrideScreenSecurity OverrideScreenSecurity NO
Option Value
true true
false false
Whether screen security should be overridden to enable hidden fields to be edited. Possible values: true, false
OverrideEditableFlag OverrideEditableFlag NO
Option Value
true true
false false
Whether screen security should be overridden to enable uneditable fields to be edited. Possible values: true, false

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Raw Description
body DT_WSTR nvarchar(4000) 4000 False
If the column you are looking for is missing, consider customizing Jira Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Raw Description
Id DT_STR varchar(50) 50 False Issue Id or Key
ProjectId DT_WSTR nvarchar(50) 50 False Project in which to create an issue. Must use this field or ProjectKey
ProjectKey DT_WSTR nvarchar(50) 50 False Project in which to create an issue. Must use this field or ProjectId
Summary DT_WSTR nvarchar(150) 150 False Issue title
Description DT_NTEXT nvarchar(MAX) True
DescriptionFormatted DT_NTEXT nvarchar(MAX) True
Environment DT_NTEXT nvarchar(MAX) True
EnvironmentFormatted DT_NTEXT nvarchar(MAX) True
IssueTypeId DT_WSTR nvarchar(50) 50 False
IssueTypeName DT_WSTR nvarchar(50) 50 False
AssigneeUserId DT_WSTR nvarchar(50) 50 False User ID representing a user assigned to an issue
ReporterUserId DT_WSTR nvarchar(50) 50 False User ID representing a user who reported an issue
Labels DT_WSTR nvarchar(2000) 2000 True Labels, assigned to an issue in JSON string array format
DueDate DT_DBDATE date False A date refering to due date of an issue
[$parent.key$] DT_WSTR nvarchar(2000) 2000 False [Dynamic Column]
[$parent.key$]_value DT_WSTR nvarchar(2000) 2000 False Set [Dynamic Column] value by option text
[$parent.key$]_id DT_WSTR nvarchar(20) 20 False Set [Dynamic Column] value by option item id
[$parent.key$]_text DT_NTEXT nvarchar(MAX) True [Dynamic Column]_text
Required columns that you need to supply are bolded.

Examples

SSIS

Use Jira Connector in API Source component to read data or in API Destination component to read/write data:

Update rows in Issues table using API Destination

This Endpoint belongs to Issues table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

Jira
Issues
Update
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

UPDATE Issue

Updates an issue

UPDATE Issues
SET Summary = 'This is my summary'
   ,Description = 'Lot''s of stuff to describe'
   ,Labels = '[ "bugfix" ]'
   ,DueDate = '2029-10-10'
--WHERE Id=1234   
--WHERE Id='ISSKEY'   
WITH (
	IssueIdOrKey='ISSKEY', --or use Id in where clause 
	Output=1,
	NotifyUsers=0,
	OverrideScreenSecurity=0,
	OverrideEditableFlag=0,
	ContinueOn404Error=0
)'

UPDATE / Insert Issue with Custom Fields

Updates or Insert an issue with custom fields of various types (dropdown, radio, textarea .. so on)

UPDATE Issues
SET customfield_10050='[{"value":"AAA"},{"value":"BBB"}]'	--CUSTOM Checkboxes field update (Must use Raw JSON)
,customfield_10051='2020-12-31'	--CUSTOM Date field update
,customfield_10052='2020-12-31T23:59:59'	--CUSTOM DateTime field update

--Custom Dropdown / Radio fields
,customfield_10048_value='BBB'	--CUSTOM Dropdown field update (Using value - i.e. item label)
--OR--
--,customfield_10048_id='10022'	--CUSTOM Dropdown field update (Using id - i.e. item id)
--OR--
--,customfield_10048='{"value":"BBB"}'	--CUSTOM Dropdown (Using Raw value)

,customfield_10053='["bugfix","test"]'	--CUSTOM Labels field update (Must use Raw JSON)
,customfield_10057='[{"value":"AAA"},{"value":"BBB"}]'	--CUSTOM Listbox Multiselect field update (Must use Raw JSON)
,customfield_10049=123455555.123	--CUSTOM Number field update
,customfield_10054_text='Long string...line-1 
	Long string... line-2 
	Long string... line-3'	--CUSTOM Paragraph field update

,customfield_10055_value='BBB'	--CUSTOM Radio field update by value
--OR--
--,customfield_10055_id='10023'	--CUSTOM Radio field update

,customfield_10058='https://zappysys.com'	--CUSTOM Url field update
,customfield_10059_accountId="5dd64082af96bc0efbe55103" --CUSTOM User field update (update by accountId)
--OR--
--,customfield_10059='{"accountId":"5dd64082af96bc0efbe55103","displayName":"System"}'	--CUSTOM User field update --accountId=5dd64082af96bc0efbe55103
,customfield_10060='Custom text single line'	--CUSTOM text single line field 
,customfield_10001='577069e1-1bcd-4b1e-9070-0b2475830d1c'	--CUSTOM Team field update (update by Team Id)
--WHERE Id=10000
WITH (
	IssueIdOrKey='ISSKEY', --or use Id in where clause 
	Output=1,
	NotifyUsers=0,
	OverrideScreenSecurity=0,
	OverrideEditableFlag=0,
	ContinueOn404Error=0
)

--For INSERT use same values with same fields like below. For Insert you do not have to specify Id or Key
--INSERT INTO Issues(ProjectKey, IssueTypeName, Summary, Description, customfield_10050,....., customfield_10060) 
--VALUES ('SMP', 'Task', 'My ticket inserted through the API', 'A description about an issue', '[{"value":"AAA"},{"value":"BBB"}]' ,... 'Custom text single line')

'

UPDATE multiple Issues matching with JQL search query

Updates multiple issues which match with certain condition (JQL). Adding Where 1=1 or some other WHERE condition invokes Lookup endpoint (refer to other example to learn about JQL - see Search issues using Advanced JQL query expression)

UPDATE Issues
SET Summary = 'This is done on <<fun_now>>'
Where 1=1
WITH (jql='status=done' , ContinueOn404Error=0)
--WITH (jql='key in(10001, 10002, 10003)' , ContinueOn404Error=0)
--WITH (jql='key in(CS-1, CS-2, CS-3)', ContinueOn404Error=0)

Update Custom Option Field (Dropdown/Radio)

This example shows how to update a custom field of an issue by Option Value or Id (Of option entry item)

--(By value)        
UPDATE Issues 
SET customfield_10048_value ='BBB' --supply value (label) of dropdown/radio
WITH (IssueIdOrKey='10020')

--OR-- (By item ID)

UPDATE Issues 
SET customfield_10048_id =10023 --supply id of dropdown/radio item
WITH (IssueIdOrKey='10020')

--OR-- (Raw id)

UPDATE Issues 
SET customfield_10048='{"id":"10023"}' --supply raw json
WITH (IssueIdOrKey='10020')

--OR--  (Raw value)
UPDATE Issues 
SET customfield_10048='{"value":"BBB"}' --supply raw json
WITH (IssueIdOrKey='10020')

--OR--  (set null)

UPDATE Issues 
SET customfield_10048 =null 
WITH (IssueIdOrKey='10020')

Update Custom Multi Select / User / Team fields (RAW Json Update)

This example shows how to update a custom field of type array or other complex fiels like user

UPDATE Issues 
SET customfield_10048='[{"value":"AAA"}, {"value":"CCC"}]' --supply raw json
WITH (IssueIdOrKey='10020')

--OR-- 

UPDATE Issues 
SET customfield_10048 =null --set to null
WITH (IssueIdOrKey='10020')

update_issue endpoint belongs to Issues table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

UPDATE Issue

Updates an issue

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Issues
SET Summary = ''This is my summary''
   ,Description = ''Lot''''s of stuff to describe''
   ,Labels = ''[ "bugfix" ]''
   ,DueDate = ''2029-10-10''
--WHERE Id=1234   
--WHERE Id=''ISSKEY''   
WITH (
	IssueIdOrKey=''ISSKEY'', --or use Id in where clause 
	Output=1,
	NotifyUsers=0,
	OverrideScreenSecurity=0,
	OverrideEditableFlag=0,
	ContinueOn404Error=0
)''';

EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];

UPDATE / Insert Issue with Custom Fields

Updates or Insert an issue with custom fields of various types (dropdown, radio, textarea .. so on)

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Issues
SET customfield_10050=''[{"value":"AAA"},{"value":"BBB"}]''	--CUSTOM Checkboxes field update (Must use Raw JSON)
,customfield_10051=''2020-12-31''	--CUSTOM Date field update
,customfield_10052=''2020-12-31T23:59:59''	--CUSTOM DateTime field update

--Custom Dropdown / Radio fields
,customfield_10048_value=''BBB''	--CUSTOM Dropdown field update (Using value - i.e. item label)
--OR--
--,customfield_10048_id=''10022''	--CUSTOM Dropdown field update (Using id - i.e. item id)
--OR--
--,customfield_10048=''{"value":"BBB"}''	--CUSTOM Dropdown (Using Raw value)

,customfield_10053=''["bugfix","test"]''	--CUSTOM Labels field update (Must use Raw JSON)
,customfield_10057=''[{"value":"AAA"},{"value":"BBB"}]''	--CUSTOM Listbox Multiselect field update (Must use Raw JSON)
,customfield_10049=123455555.123	--CUSTOM Number field update
,customfield_10054_text=''Long string...line-1 
	Long string... line-2 
	Long string... line-3''	--CUSTOM Paragraph field update

,customfield_10055_value=''BBB''	--CUSTOM Radio field update by value
--OR--
--,customfield_10055_id=''10023''	--CUSTOM Radio field update

,customfield_10058=''https://zappysys.com''	--CUSTOM Url field update
,customfield_10059_accountId="5dd64082af96bc0efbe55103" --CUSTOM User field update (update by accountId)
--OR--
--,customfield_10059=''{"accountId":"5dd64082af96bc0efbe55103","displayName":"System"}''	--CUSTOM User field update --accountId=5dd64082af96bc0efbe55103
,customfield_10060=''Custom text single line''	--CUSTOM text single line field 
,customfield_10001=''577069e1-1bcd-4b1e-9070-0b2475830d1c''	--CUSTOM Team field update (update by Team Id)
--WHERE Id=10000
WITH (
	IssueIdOrKey=''ISSKEY'', --or use Id in where clause 
	Output=1,
	NotifyUsers=0,
	OverrideScreenSecurity=0,
	OverrideEditableFlag=0,
	ContinueOn404Error=0
)

--For INSERT use same values with same fields like below. For Insert you do not have to specify Id or Key
--INSERT INTO Issues(ProjectKey, IssueTypeName, Summary, Description, customfield_10050,....., customfield_10060) 
--VALUES (''SMP'', ''Task'', ''My ticket inserted through the API'', ''A description about an issue'', ''[{"value":"AAA"},{"value":"BBB"}]'' ,... ''Custom text single line'')

''';

EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];

UPDATE multiple Issues matching with JQL search query

Updates multiple issues which match with certain condition (JQL). Adding Where 1=1 or some other WHERE condition invokes Lookup endpoint (refer to other example to learn about JQL - see Search issues using Advanced JQL query expression)

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Issues
SET Summary = ''This is done on <<fun_now>>''
Where 1=1
WITH (jql=''status=done'' , ContinueOn404Error=0)
--WITH (jql=''key in(10001, 10002, 10003)'' , ContinueOn404Error=0)
--WITH (jql=''key in(CS-1, CS-2, CS-3)'', ContinueOn404Error=0)';

EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];

Update Custom Option Field (Dropdown/Radio)

This example shows how to update a custom field of an issue by Option Value or Id (Of option entry item)

DECLARE @MyQuery NVARCHAR(MAX) = '--(By value)        
UPDATE Issues 
SET customfield_10048_value =''BBB'' --supply value (label) of dropdown/radio
WITH (IssueIdOrKey=''10020'')

--OR-- (By item ID)

UPDATE Issues 
SET customfield_10048_id =10023 --supply id of dropdown/radio item
WITH (IssueIdOrKey=''10020'')

--OR-- (Raw id)

UPDATE Issues 
SET customfield_10048=''{"id":"10023"}'' --supply raw json
WITH (IssueIdOrKey=''10020'')

--OR--  (Raw value)
UPDATE Issues 
SET customfield_10048=''{"value":"BBB"}'' --supply raw json
WITH (IssueIdOrKey=''10020'')

--OR--  (set null)

UPDATE Issues 
SET customfield_10048 =null 
WITH (IssueIdOrKey=''10020'')';

EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];

Update Custom Multi Select / User / Team fields (RAW Json Update)

This example shows how to update a custom field of type array or other complex fiels like user

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Issues 
SET customfield_10048=''[{"value":"AAA"}, {"value":"CCC"}]'' --supply raw json
WITH (IssueIdOrKey=''10020'')

--OR-- 

UPDATE Issues 
SET customfield_10048 =null --set to null
WITH (IssueIdOrKey=''10020'')';

EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];

update_issue endpoint belongs to Issues table(s), and can therefore be used via those table(s).