[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-29 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-18386


more flexible job filter by parameter















Code changed in jenkins
User: jacob_robertson
Path:
 src/main/webapp/most-recent-help.html
 src/main/webapp/regex-help.html
http://jenkins-ci.org/commit/view-job-filters-plugin/26f950ad6f7a5b599d0f1e859743e3aae92f2530
Log:
  fixed JENKINS-18386, JENKINS-17597, JENKINS-17093, JENKINS-18399






























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-29 Thread jacob.robertson.w...@gmail.com (JIRA)















































Jacob Robertson
 resolved  JENKINS-18386 as Fixed


more flexible job filter by parameter
















Change By:


Jacob Robertson
(29/Jun/13 6:28 PM)




Status:


Open
Resolved





Resolution:


Fixed



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-29 Thread jacob.robertson.w...@gmail.com (JIRA)












































 
Jacob Robertson
 edited a comment on  JENKINS-18386


more flexible job filter by parameter
















I implemented this, but it's pretty sketchy.  Essentially, it will do a toString, and whatever comes back will be matched on.  In the examples you gave, they don't actually have a very good toString method, however, it will actually work if you use a flexible enough regex.  For example, if the toString returns something like "SomeParam(name=foo, value=bar)", and you want to match on the value "bar", you would have to write a regex that took into account the actual toString, like doing ".bar." or whatever.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-29 Thread jacob.robertson.w...@gmail.com (JIRA)












































 
Jacob Robertson
 edited a comment on  JENKINS-18386


more flexible job filter by parameter
















I implemented this, but it's pretty sketchy.  Essentially, it will do a toString, and whatever comes back will be matched on.  In the examples you gave, they don't actually have a very good toString method, however, it will actually work if you use a flexible enough regex.  For example, if the toString returns something like "SomeParam(name=foo, value=bar)", and you want to match on the value "bar", you would have to write a regex that took into account the actual toString, like doing ".bar." or whatever.  This will work for the case you described.  I forgot the exact toString, but it's something like the example I gave here.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-29 Thread jacob.robertson.w...@gmail.com (JIRA)














































Jacob Robertson
 commented on  JENKINS-18386


more flexible job filter by parameter















I implemented this, but it's pretty sketchy.  Essentially, it will do a toString, and whatever comes back will be matched on.  In the examples you gave, they don't actually have a very good toString method, however, it will actually work if you use a flexible enough regex.  For example, if the toString returns something like "SomeParam(name=foo, value=bar)", and you want to match on the value "bar", you would have to write a regex that took into account the actual toString, like doing ".bar." or whatever.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-28 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-18386


more flexible job filter by parameter















Code changed in jenkins
User: jacob_robertson
Path:
 src/main/java/hudson/views/MostRecentJobsFilter.java
 src/main/java/hudson/views/ParameterFilter.java
 src/main/java/hudson/views/RegExJobFilter.java
 src/main/resources/hudson/views/MostRecentJobsFilter/config.jelly
 src/main/resources/hudson/views/ParameterFilter/config.jelly
 src/main/resources/hudson/views/RegExJobFilter/config.jelly
 src/test/java/hudson/views/ParameterFilterTest.java
http://jenkins-ci.org/commit/view-job-filters-plugin/b10005a320585ed2fa03d6b06064fdb53fa0019c
Log:
  fixed JENKINS-18386, JENKINS-17597, JENKINS-17093, JENKINS-18399






























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-27 Thread maris.zu...@gmail.com (JIRA)














































Maris Zulis
 commented on  JENKINS-18386


more flexible job filter by parameter















I'm trying to use this plugin: https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin

I set Node parameter with name "slave". And my job only executes shell command "echo $slave". If I can print this parameter then there should be a way to make it string.

I also installed https://wiki.jenkins-ci.org/display/JENKINS/Show+Build+Parameters+Plugin and it also show this parameter

As I can see in code https://github.com/petehayes/show-build-parameters-plugin/blob/master/src/main/java/jenkins/plugins/show_build_parameters/ShowParametersBuildAction.java

script only collects ParameterValue List with getParameters function and then prints it out
https://github.com/petehayes/show-build-parameters-plugin/blob/master/src/main/resources/jenkins/plugins/show_build_parameters/ShowParametersBuildAction/summary.jelly

Maybe I don't understand correctly but it should use toString() to convert it 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-26 Thread jacob.robertson.w...@gmail.com (JIRA)














































Jacob Robertson
 commented on  JENKINS-18386


more flexible job filter by parameter















This would be easy to implement, but I don't know of any parameters that use "toString".  If you just mean your own company's custom parameters, then it can still be implemented, it just won't really be easy to test before releasing.  It would be more helpful if you could give an example parameter plugin that I could install and test against.  I tried a couple, but they don't use "toString", so it didn't work.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-18 Thread maris.zu...@gmail.com (JIRA)














































Maris Zulis
 created  JENKINS-18386


more flexible job filter by parameter















Issue Type:


Improvement



Affects Versions:


current



Assignee:


Jacob Robertson



Components:


view-job-filters



Created:


18/Jun/13 1:32 PM



Description:


parameter filter can only filter by StringParameterValue, BooleanParameterValue and FileParameterValue. So we can't filter by custom parameters.

I can't understand why can't we change ParameterFilter class getStringValue function to something like this:

protected String getStringValue(ParameterValue value) {
		if (value instanceof StringParameterValue) {
			return ((StringParameterValue) value).value;
		} else if (value instanceof BooleanParameterValue) {
			boolean bval = ((BooleanParameterValue) value).value;
			return String.valueOf(bval);
		} else if (value instanceof FileParameterValue) {
			// not the full path - just the name
			// this is the only public value available to us
			String file = ((FileParameterValue) value).getOriginalFileName();
			return file;
		} else {
			return value.toString();
		}
	}


mine difference is return value.toString(); not return null;




Project:


Jenkins



Priority:


Critical



Reporter:


Maris Zulis

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] [view-job-filters] (JENKINS-18386) more flexible job filter by parameter

2013-06-18 Thread maris.zu...@gmail.com (JIRA)














































Maris Zulis
 updated  JENKINS-18386


more flexible job filter by parameter
















Change By:


Maris Zulis
(18/Jun/13 1:36 PM)




Description:


parameterfiltercanonlyfilterbyStringParameterValue,BooleanParameterValueandFileParameterValue.Sowecantfilterbycustomparameters.IcantunderstandwhycantwechangeParameterFilterclassgetStringValuefunctiontosomethinglikethis:
{code:none}
protectedStringgetStringValue(ParameterValuevalue){		if(valueinstanceofStringParameterValue){			return((StringParameterValue)value).value;		}elseif(valueinstanceofBooleanParameterValue){			booleanbval=((BooleanParameterValue)value).value;			returnString.valueOf(bval);		}elseif(valueinstanceofFileParameterValue){			//notthefullpath-justthename			//thisistheonlypublicvalueavailabletous			Stringfile=((FileParameterValue)value).getOriginalFileName();			returnfile;		}else{			returnvalue.toString();		}	}
{code}
minedifferenceisreturnvalue.toString();notreturnnull;



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.