Using wildcards in Jira JQL - jira-agile

In the question Query JIRA versions using wildcards with JQL
The answer is to use something like project=MYPROJ and fixversion in versionMatch("DEVX*") using the asterix at DEVX*.
In my case I have: getting all the issues from CBS-6840 up to CBS-6849
project = CBS AND key in ("CBS-684")*
Similar to the question above what would a need to add instead of versionMatch

You might look at the many add-ons in the Atlassian Marketplace to see if anyone has scripted functions to provide the sort of functionality you are looking for. A pretty accessible work-around that I would suggest is below (using the JIRA / Hipchat issues themselves as an example). It uses the strict ordered-ness of JIRA keys without needing a wildcard.
project = HCPUB and issuekey >= "HCPUB-730" and issuekey <= "HCPUB-739"
You can also always generate the list yourself, which can be a little tedious:
project = HCPUB and issuekey in ('HCPUB-730','HCPUB-731',...)

Related

Can we use regular expression to mention cucumber options feature files?

#CucumberOptions(features = {"src/test/resources/features/module*.feature"},
tags = "#E2e",)
mvn clean verify -Dcucumber.features=”module*.feature” -Dcucumber.filter.tags="#E2E"
Is there any way to use regex to identify feature files? It takes it up as file name.
I want moduleone,moduletwo,modulethree to get executed.
PS: I am aware about tags but my logic is in such a way that using feature regex will help me.
The short answer is no. You can not. You can only reference files or directories. Patterns are not supported.

Configuration file in Azure Functions

I need to read from a JSON configuration file in Azure Function. Is there a way to refer to the file without hard-coding any paths(assuming it's in same directory as the code).
The solution in another answer was something like:
string configuration = string.IsNullOrEmpty(configurationFile) ? "" : File.ReadAllText(Environment.GetEnvironmentVariable("HOME") + #"\site\wwwroot\functionname\filename);
Is there a better way to get this path, or read JSON configuration in general for Azure Function?
Currently, the solution you found is the recommended approach, but with the next release, which is starting to roll out today (5/30/2017), we've introduced a feature to enhance this.
You can learn more about it here:
https://github.com/Azure/azure-webjobs-sdk-script/wiki/Retrieving-information-about-the-currently-running-function
you're able to find out some explanations about this same topic on this another thread, here.
I hope that this information help you.

What parameters does a function takes

I am trying to create an edgeCollection via node command line. I think the db.edgeCollection does this for me. What I don't know is what extra parameters does the function take in order to create a new edge collection.
I am currently using arangojs version 2.15.9
var database = require("arangojs").Database;
var db = new database(http://user:pass#127.0.0.1:8529)
db.edgeCollection(##What should I write here to create a new edge collection?##)
It would be nice if there is a global way of knowing the parameters required by any function.
I am using vim as my code editor.
To create an edgeCollection all I needed to do was this
var collection = db.edgeCollection("new-edge");
collection.create();
This solves the first part. And I am really sorry for not looking for the answer more because there is already a thread that answers the 2nd part of the question.
show function parameters in vim
I think if I understand your question correctly you need to go with arangojs documentation.
Try this https://www.npmjs.com/package/arangojs
If you are using vim editor you lose so many suggestion opportunities provided by IDEs like eclipse,Idea or even notepad++

Cucumber feature outlines

Is it possible to parameterise a feature file in the same way it is a scenario? So each scenario in the feature could refer to some variables which are later defined by a single table for the entire feature file?
All of the answers I've found so far (Feature and scenario outline name in cucumber before hook for example) use Ruby meta-programming, which doesn't inspire much hope for the jvm setup I'm using.
No its not, and for good reason. Feature files are meant to be simple and readable, they are not for programming. Even using scenario outlines and tables is generally not a good thing, so taking this further and having a feature that cannot be understood without reading some other thing that defines variables is counter productive.
You can however put all your variables and stuff in step definitions and write your feature at a higher level of abstraction. You'll find implementing this much easier, as you can use a programming language (which is good at this stuff).
One way of parameterising a feature file is to generate it from a template at compile-time. Then at runtime your cucumber runner executes the generated feature file.
This is fairly easy to do if you are using gradle. Here is an example:
In build.gradle, add groovy code like this:
import groovy.text.GStringTemplateEngine
task generateFeatureFiles {
doFirst {
File featuresDir = new File(sourceSets.main.output.resourcesDir, "features")
File templateFile = new File(featuresDir, "myFeature.template")
def(String bestDay, String currentDay) = ["Friday", "Sunday"]
File featureFile = new File(featuresDir, "${bestDay}-${currentDay}.feature")
Map bindings = [bestDay: bestDay, currentDay: currentDay]
String featureText = new GStringTemplateEngine().createTemplate(templateFile).make(bindings)
featureFile.text = featureText
}
}
processResources.finalizedBy(generateFeatureFiles)
myFeature.template is in the src/main/resources/features directory and might look like this:
Feature: Is it $bestDay yet?
Everybody wants to know when it's $bestDay
Scenario: $currentDay isn't $bestDay
Given today is $currentDay
When I ask whether it's $bestDay yet
Then I should be told "Nope"
Running the build task will create a Friday-Sunday.feature file in build/src/main/resources with the bestDay and currentDay parameters filled in.
The generateFeatureFiles custom task runs immediately after the processResources task. The generated feature file can then be executed by the cucumber runner.
You could generate any number of feature files from the feature template file. The code could read in parameters from a config file in your resources directory for example.

Labelling Neo4j database using Neo4django

This question is related to the github issue of Neo4django. I want to create multiple graphs using Neo4j graph DB from Django web framework. I'm using Django 1.4.5, neo4j 1.9.2 and neo4django 0.1.8.
As of now Neo4django doesn't support labeling but the above is my core purpose and I want to be able to create labels from Neo4django. So I went into the source code and tried to tweak it a little to see if I can make this addition. In my understanding, the file 'db/models/properties.py' has class BoundProperty(AttrRouter) which calls gremlin script through function save(instance, node, node_is_new). The script is as follows:
script = '''
node=g.v(nodeId);
results = Neo4Django.updateNodeProperties(node, propMap);
'''
The script calls the update function from library.groovy and all the function looks intuitive and nice. I'm trying to add on this function to support labeling but I have no experience of groovy. Does anyone have any suggestions on how to proceed? Any help would be appreciated. If it works it would be a big addition to neo4django :)
Thank you
A little background:
The Groovy code you've highlighted is executed using the Neo4j Gremlin plugin. First it supports the Gremlin graph DSL (eg node=g.v(nodeId)), which is implemented atop the Groovy language. Groovy itself is a dynamic superset of Java, so most valid Java code will work with scripts sent via connection.gremlin(...). Each script sent should define a results variable that will be returned to neo4django, even if it's just null.
Anyway, accessing Neo4j this way is handy (though will be deprecated I've heard :( ) because you can use the full Neo4j embeddeded Java API. Try something like this to add a label to a node
from neo4django.db import connection
connection.gremlin("""
node = g.v(nodeId)
label = DynamicLabel.label('Label_Name')
node.rawVertex.addLabel(label)
""", nodeId=node_id)
You might also need to add an import for DynamicLabel- I haven't run this code so I'm not sure. Debugging code written this way is a little tough, so make liberal use of the Gremlin tab in the Neo4j admin.
If you come up with a working solution, I'd love to see it (or an explanatory blog post!)- I'm sure it could be helpful to other users.
HTH!
NB - Labels will be properly supported shortly after Neo4j 2.0's release- they'll replace the current in-graph type structure.

Resources