Re: How can I make a pop-up?
| Newsgroups | gmane.comp.java.jira.user |
|---|---|
| Message-ID | <30742586.327731309167806832.JavaMail.j2ee_forums.atlassian.com@atlassian12.managed.contegix.com> |
Hi!
I add the code:
int suma_timespent = 0;
int suma_camposelect = 0;
int suma_total = 0;
boolean test = false;
MutableIssue issuemutable = issue;
ComponentManager componentManager = ComponentManager.getInstance() ;
IssueIndexManager indexManager = ComponentManager.getInstance().getIndexManager();
CustomFieldManager customFieldManager = componentManager.getCustomFieldManager();
IssueManager issueManager = componentManager.getIssueManager();
try {
CustomField customField = customFieldManager.getCustomFieldObject(11860) // Here add the ID of the Label or TextBox!!!
fieldLayoutItem=ComponentManager.getInstance().getFieldLayoutManager().getFieldLayout(issuemutable).getFieldLayoutItem(customField);
String customField_time_spent = "customfield_11200"
String camposelect_time = (String) WorkflowUtils.getFieldValueFromIssue(issue, WorkflowUtils.getFieldFromKey(customField_time_spent)) ?: ""
if (camposelect_time.toString() != ""){
test = true;
}
if (issuemutable.getTimeSpent().toString() != "null"){
test = true;
}
String msjWarning = "";
if (test) {
msjWarning = "----- Message 1 -----";
}
else{
msjWarning = " ----- Message 2 -----";
}
modifiedValue = new ModifiedValue(issuemutable.getCustomFieldValue(customField), msjWarning);
// Update Message Custom Field
customField.updateValue(fieldLayoutItem, issuemutable, modifiedValue, new DefaultIssueChangeHolder());
} catch (Exception e){
archivo.append( "ERROR: " + e.getMessage());
}
Can help me?¿ :-(
--
Post by ouuchone - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=54753
_______________________________________________
Jira-user mailing list
[email protected]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user