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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What do these JJUPIN Live Field log errors mean?

I'm getting the following showing up in my atlassian-JIRA log: 

2016-08-01 15:08:56,947 ajp-nio-8009-exec-33 WARN username 908x317210x1 2x5orf ipaddress /rest/keplerrominfo/jjupin/latest/lf/instantHook [c.k.j.p.j.ui.livevalidator.LiveFieldRestService] Sil exception when executing script.
 at com.keplerrominfo.jira.plugins.jjupin.ui.livevalidator.LiveFieldRestService.executeHook(LiveFieldRestService.java:248)
 at com.keplerrominfo.jira.plugins.jjupin.ui.livevalidator.LiveFieldRestService.executeHooks(LiveFieldRestService.java:231)
 at com.keplerrominfo.jira.plugins.jjupin.ui.livevalidator.LiveFieldRestService.onInstantWatch(LiveFieldRestService.java:212)
 at com.keplerrominfo.jira.plugins.jjupin.ui.livevalidator.LiveFieldRestService.executeHook(LiveFieldRestService.java:248)
 at com.keplerrominfo.jira.plugins.jjupin.ui.livevalidator.LiveFieldRestService.executeHooks(LiveFieldRestService.java:231)
 at com.keplerrominfo.jira.plugins.jjupin.ui.livevalidator.LiveFieldRestService.onInstantWatch(LiveFieldRestService.java:212)

It unfortunately doesn't list the specific SIL script that is failing, so I can't figure out what's causing the error. I've listed the three Live Field scripts I'm using below - perhaps someone could take a look and see if they see anything that might be causing the error?

First Script:

if (!contains(argv["screen"], "create")) {
if( (issueType == "Circuits" ||
issueType == "CSA - Add/Mod" ||
issueType == "Cut Sheet Sub-Task" ||
issueType == "Hardware Sub-Task" ||
issueType == "LNP DID Order" ||
issueType == "LNP Port Request" ||
issueType == "Prov Sub-Task" ||
issueType == "Sub-task" || 
issueType == "Technical task" ||
issueType == "Training") &&
assignee != currentUser()) {
lfDisable("dueDate");
}
}

 

Second Script:

lfInstantHook({"project", "issueType"}, "CreateScreenLiveFields.sil");
lfWatch("issueType", {"issueType", "project"}, "CreateScreenLiveFields.sil");
lfWatch("project", {"issueType", "project"}, "CreateScreenLiveFields.sil"); //Wasn't sure which of these were necessary

CreateScreenLiveFields.sil is:

if (argv["screen"] == "create" and contains(argv["project"], "Infrastructure Change Request")) {
    lfRestrictSelectOptions("issueType", {"Standard Change Request","MAINT JIRA"}, true);
}
if(argv["screen"] == "create" && contains(argv["project"], "Salesforce Platform") && argv["issueType"] == "Bug") {
   //on Create Issue screen
    lfSet("description",
                        "[Please fill in information requested in this description template] \n\n" + 
                        "Description of Problem: \n\n" +
                        "List of Steps To Reproduce the Problem: \n" +
                        "1. \n" +
                        "2. \n" +
                        "etc ... \n \n" +
                        "Expected Results: \n\n" +
                        "Actual Results: \n\n" +
                        "Data Used: \n" +
                        "-Userid: \n" +
                        "-Fields: \n" +
                        "etc ... \n\n" +
                        "Reproducible: (Yes/No) ( if Yes, describe frequency of occurrence e.g. 8 out of 10 attempts) \n\n" +
                        "Screenshots or video Attached (Yes/No): \n");
    lfShowFieldMessage("description", "Description Template Automatically Populated. Please fill in information requested", "INFO");
}
if(argv["screen"] == "create" && contains(argv["project"], "Salesforce Platform") && argv["issueType"] == "Story") {
   //on Create Issue screen
    lfSet("description",
                        "[Please fill in information requested in this description template] \n\n" + 
                        "Requestor: \n\n" +
                        "Details of Request: \n" +
                        "* (e.g. Report affected, new field, new users,...) \n\n\n" +
                        "Business Rationale: \n" +
                        "* (Note: new user accounts have a real world dollar cost! and an email should be attached indicating managerial support for the request) \n\n\n" +
                        "Impact: \n\n\n" +
                        "Screenshots attached if applicable: (Yes/No): \n\n\n" +
                        "Implementation Note about Validation: \n");
    lfShowFieldMessage("description", "Description Template Automatically Populated. Please fill in information requested", "INFO");
}
if (contains(argv["project"], "Salesforce Platform")) { lfRestrictSelectOptions("issueType", "Offboarding", true); }
if(argv["screen"] == "create" && (contains(argv["project"], "Portal") || contains(argv["project"], "Automation") || contains(argv["project"], "HUB")) && argv["issueType"] == "Bug") {
   //on Create Issue screen
    lfSet("description",
                        "*Steps to Reproduce* \n\n" + 
                        "# \n# \n# \n\n" +
                        "*Expected Results* \n\n" +
                        "Expected to see\n\n" +
                        "*Actual Results*\n\n" +
                        "Actually saw that\n\n");
    lfShowFieldMessage("description", "Description Template Automatically Populated. Please fill in information requested", "INFO");
}
if(argv["screen"] == "create" && (contains(argv["project"], "Portal") || contains(argv["project"], "Automation") || contains(argv["project"], "HUB")) && argv["issueType"] == "Story") {
   //on Create Issue screen
    lfSet("description",
                        "*Acceptance Criteria* \n\n" + 
                        "* \n* \n* \n");
    lfShowFieldMessage("description", "Description Template Automatically Populated. Please fill in information requested", "INFO");
}
if(argv["screen"] == "create" && contains(argv["project"], "Onboarding and Offboarding") && argv["issueType"] == "Offboarding")
{
    lfSet("summary", "New Termination Request");
}

 

Third Script is simply:

lfRestrictSelectOptions("issueType", "Offboarding", true);

 

Any help would be great!

3 answers

Sil exception when executing script.

 

Can you share the root cause for it? It's there, on the full stacktrace.

Found it: Script is not running in the context of an issue.Cannot get value for field key

I added: if (!contains(argv["screen"], "create"))

to the script generating the issue - is there anywhere else that a Live Fields script could be running that wouldn't be in the context of an issue? If so, how should I edit the script to ensure it doesn't run there?

Thanks for your help!

Nope, only the create screen needs that. In general, people forget that on LF there's no issue until it is saved.

Have fun.

Thanks so much for your help!

I am facing the similar problem... from the log I see this error... 

Script is not running in the context of an issue.Cannot get value for field issueType

 

Below is my script... 

if(issueType== "Change Request")
{
//////////////////////////////////////////////////////////////////////////////////////////////////
// For CR Live Field check
//////////////////////////////////////////////////////////////////////////////////////////////////
lfWatch("summary", {"summary","issueType"}, "CR_ResetApprovalHookScript.sil", {"change"});
lfWatch("description", {"description","issueType"}, "CR_ResetApprovalHookScript.sil", {"change"});

}

i only want to run the "CR_ResetApprovalHookScript.sil" code if the issuetpye is "Change Request" rest I don't want to do anything.

Is this a right way to do it? if not what is right way to achieve the behavior. 

 

Thanks in advance. 

~Samip

Hi Samip,


Are you running the script on create screen? If so, try to replace your if with

if argv["issueType"] == "Change Request"

Hope this helps,

Alexandra

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

641 views 7 23
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you