Reference

Endpoint Update Issue


Name

update_issue

Description

No description available

Related Tables

Issues

Parameters

Parameter Required Options
Name: IssueIdOrKey

Label: IssueIdOrKey

Enter Issue ID or Key
Name: NotifyUsers

Label: NotifyUsers

Whether a notification email about the issue update is sent to all watchers. Possible values: true, false
Option Value
true true
false false
Name: OverrideScreenSecurity

Label: OverrideScreenSecurity

Whether screen security should be overridden to enable hidden fields to be edited. Possible values: true, false
Option Value
true true
false false
Name: OverrideEditableFlag

Label: OverrideEditableFlag

Whether screen security should be overridden to enable uneditable fields to be edited. Possible values: true, false
Option Value
true true
false false

Output Columns

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

Input Columns

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

Examples

SSIS

Use Jira Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Destination

This Endpoint belongs to the Issues table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to update issue:

API Destination - Jira
Jira connector can be used to read, write, delete Issues, Users, Worklogs, Comments, Projects, Custom fileds and many other details
Jira
Issues
Update
Optional Parameters
IssueIdOrKey
NotifyUsers false
OverrideScreenSecurity false
OverrideEditableFlag false
Continue On 404 Error (When record not found) False
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).