Buy anything from HongKong - Dealextreme

You can buy any kind of electronic gadgets from DealExtreme with free shipping option.
Please visit DealExtreme for very low prices.
Here is the link to the site : www.dealextreme.com

05 November 2013

Find string in files

Taken from: http://www.liamdelahunty.com/tips/linux_find_string_files.phpfind . | xargs grep 'string' -slThe -s is for summary and won't display warning messages such as grep: ./directory-name: Is a directoryThe -l is for list, so we get just the filename and not all instances of the match displayed in the results.
Performing the search on the current directory I get:
./javascript_open_new_window_form.php
./excel_large_number_error.php
I find this useful for just quickly seeing which files contain a search time. I would normally limit the files searched with a command such as :
find . -iname '*php' | xargs grep 'string' -slAnother common search for me, is to just look at the recently updated files:
find . -iname '*php' -mtime -1 | xargs grep 'string' -slwould find only files edited today, whilst the following finds the files older than today:
find . -iname '*php' -mtime +1 | xargs grep 'string' -sl






Automatic creation of jira tasks by using Script Listeners

  1. In the Script Listeners section select "Create a subtask" for automatic creation of subtasks.
  2. In the Script Listeners section select "Clones an issues and links" for automatic creation of the same task in another project


Sample condition: 

(issue.projectObject.name != "PRJ" && issue.issueTypeObject.name == 'Project') || (issue.projectObject.name == "PRJ" && issue.issueTypeObject.name == 'Incident' && issue.components.name.contains('CRM'))

Sample Modification: 


import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.customfields.manager.OptionsManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.project.component.ProjectComponent
import java.util.List
import java.util.ArrayList
import com.atlassian.jira.bc.project.component.ProjectComponent
def optionsManager = ComponentManager.getComponentInstanceOfType(OptionsManager.class)
def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Support Needed In'}
def fieldConfig = cf.getRelevantConfig(issue)
def option = optionsManager.getOptions(fieldConfig).find {it.value == "Internal Test"}
issue.setCustomFieldValue(cf, option)
issue.summary = issue.summary + " - Support (Internal Test)"
if(issue.projectObject.name == "MSP-PRJ"){
    def component = ComponentAccessor.getProjectComponentManager().findByComponentName(10500,'CRM')
    List l = new ArrayList()
    l.add(component)
    issue.setAssignee(ComponentAccessor.getUserUtil().getUser('egulec'))
    issue.setComponentObjects(l)
}