Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How create table from Post-function?


How create table from Post-function? My code no work 

import com.atlassian.jira.component.ComponentAccessor;

customFieldManager = ComponentAccessor.getCustomFieldManager();

def customField_1 = customFieldManager.getCustomFieldObjectByName("Data urd")

def customFieldValue_1 = transientVars["issue"].getCustomFieldValue(customField_1)

def customField_2 = customFieldManager.getCustomFieldObjectByName("id")

def customFieldValue_2 = transientVars["issue"].getCustomFieldValue(customField_2)

def customField_3 = customFieldManager.getCustomFieldObjectByName("inn")

def customFieldValue_3 = transientVars["issue"].getCustomFieldValue(customField_3)

def customField_4 = customFieldManager.getCustomFieldObjectByName("URL")

def customFieldValue_4 = transientVars["issue"].getCustomFieldValue(customField_4)

def customField_5 = customFieldManager.getCustomFieldObject("customfield_37372")

def customFieldValue_5 = transientVars["issue"].getCustomFieldValue(customField_5)

def header_table = '||Data urd||id||inn||URL||ER||\n' //def description_text_1

header_table += '|'+customFieldValue_1.toString()+'|'+customFieldValue_2.toString()+'|'+customFieldValue_3.toString()+'|'+customFieldValue_4.toString()+'|'+customFieldValue_5.toString()+'|'

if(issue.description) issue.description = header_table + issue.description

else issue.description = header_table


1 answer

Fortiva Credit Card Reviews
The table name is not a string literal but an identifier -> change single-quote to double-quotes -> quoted identifier.

The name of the id field is not pk_+string literal but the whole thing is an identifier -> "pk_...."

// <--- intensive checks on $_POST[nome_arquivo_software] and $_POST[nome_arquivo_software] here
$result = pg_query("
CREATE TABLE \"$_POST[nome_arquivo_software]\" (
id serial CONSTRAINT \"pk_$_POST[nome_arquivo_software]\" PRIMARY KEY,
nome varchar (80),
email varchar (80),
estado varchar (80),
acessos numeric

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events