SIL post function not working when I use standard variables

Guess who's back! Okay so I have this working during a transition (the two CustVars are fields on the transition screen):

string strDBRequestDesc = "Variable 1: " + #{CustVar1} + "\n Variable 2:" + #{CustVar2};
string strIssueSum = 'test Issue summary';
string strJiraID = 'JIRA-123';
string strUser = 'me';

string [] results = sql("CustDBConnection", "EXEC dbo.SampleStoredProcedure @CommType = 'U',@CommFrom = 'Other',@CommDesc = '" + strDBRequestDesc + "',@CommSubject = '" + strIssueSum + "',@CommJiraID = '" + strJiraID + "',@user = '" + strUser + "',@SendMail = 1");

If replace the variable assignment with standard variables it doesn't work:

string strIssueSum = description;
string strJiraID = id;
string strUser = assignee;

I also tried putting the standard variables inside #{} and it didn't work. The editor tells me that my syntax is okay. I have a guess that while the transition screen is shown, there is no issue context, but there should be right? Thanks again for the help!

4 answers

1 accepted

Hey I tried to come back and post the answer but this site was down when I tried. I was using "id" instead of "key" which I believe was my problem. JJUPIN also keeps disabling itself (it's supposed to be running under a demo license but the warden just keeps disabling it) so that could've been an issue as well. Thanks for checking!

If no one knows what could be wrong, could someone tell me how to enable/create some detailed logs so that I can figure out where the error is occurring?

Well I used this to enable logging:

I set it to WARN, which produced no messages, so now I'm going to try print() to see the values during the transition.

Hi Steve,

Is this still a problem for you? Can I help you further?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

561 views 1 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you