So, i'm using JiraPS to create some tickets and so far i've been able to work out through trial and error how to populate certain standard and custom fields.
I'm now wanting to create a ticket and link to other tickets. I'm looking to use a standard field called "Linked Issues"
Linked Issues Screen Shot
I've exported all the Jira fields and think this is one of these fields:
ID : issuelinks
Searchable : True
Schema : #{type=array; items=issuelinks; system=issuelinks}
Name : Linked Issues
Custom : False
Navigable : True
Orderable : True
ClauseNames :
and possibly "subtasks" for the issues field:
ID : subtasks
Searchable : False
Schema : #{type=array; items=issuelinks; system=subtasks}
Name : Sub-Tasks
Custom : False
Navigable : True
Orderable : False
ClauseNames : subtasks
I only think this as "items" match issuelinks.
I note that these are array records and have tried to no avail to give them a value when creating a ticket.
I get these errors:
Invoke-JiraMethod: subtasks -------- Field 'subtasks' cannot be set. It is not on the appropriate screen, or unknown.
nvoke-JiraMethod: issuelinks ---------- Field does not support update 'issuelinks'
If anyone has any ideas if I'm on the right track or way off!
Thanks
I've managed to work it out. I was thinking about it the wrong way, what I've done now is link the ticket to the parent, rather than trying to attach the child. Hope that makes sense...
I've used Add-JiraIssueLink on the child ticket(s) to link to the parent.
Related
How do I get PowerShell to better display nested data from my cmdlets written in C#?
In the example below, "$MyData" is an array of My.Special.Data.Stuff instances.
Stuff has some simple data and two other nested instances: PriorityData and Quality.
Why does PowerShell display those items just as their class names and no data?
How can I get it to display some data for these?
Something like it does for "Created" - which is a DateTime.
PS C:\src\> $MyData[0]|fl
Id : ac21ec82-3921-70fb-a4a3-36241a21a177
Name : StuffData1
Count : 0
Created : 5/11/2022 9:33:41 PM
Destroyed : False
PriorityData : My.Special.Data.PriorityData
Quality : My.Special.Data.Quality
I've tried creating MyFormat.ps1xml with views defined for Stuff, PriorityData and Quality.
It works when I display the individual item, like "$Data[0].Quality", but not when I display the contents of "$Data[0]".
I have created a form where the user can submit some information to my mongoDB database. I would like to have a search bar where the user can search for the info from my database.
I was thinking that using Model.find() in some way, would work?
Any suggestions for how this is accomplished would be very appreciated:) I would also like to have the search results appear below the search bar in a list.
PLZZ GIVE ME CODE...
yes it works but use regex some times character comes in request may be in upper or lower case
query :
model.find({'fieldname' : {$regex : 'value', $options : 'i'}})
Created several rules using 'clear the value of ' as action, but none of them are working. In the first rule that I created, Condition : When no value is defined for Related Link Count then action : Clear the value of title.
Second rule, Condition : When no value is defined for description, Action : Clear the value of Assigned to.
None of the above seem to work. I tried several other permutations and combinations with 'clear the value of' but none seem to work.
For your second rule, it doesn't work may caused by your operation. You should add description and assigned first. And then, delete the description content, you will see that the account assigned be cleared.
But, for first rule. As I checked, I found that no matter what the action is, while the condition is related to Related Link Count, the rule will all be abnormal-- could not be applied normally.
For this error, you can report this problem here. Our engineer can investigate this issue and will fix it.
First, I'd like to say that I really love NoSQL & MongoDB but I've got some major concerns with its schema-less aspect.
Let's say I have 2 tables. Employees and Movies.
And... I have a very stupid data layer / framework that sometimes like to save objects in the wrong tables.
So one day, a Movie gets saved in the Employees table. Like this:
> use mongoTests;
switched to db mongoTests
> db.employees.insert({ name : "Max Power", sex : "Male" });
> db.employees.find();
{ "_id" : ObjectId("4fb25ce6420141116081ae57"), "name" : "Max Power", "sex" : "Male" }
> db.employees.insert({ title : "Fight Club", actors : [{ name : "Brad Pitt" }, { name : "Edward Norton" }]});
> db.employees.find();
{ "_id" : ObjectId("4fb25ce6420141116081ae57"), "name" : "Max Power", "sex" : "Male" }
{ "_id" : ObjectId("4fb25db834a31eb59101235b"), "title" : "Fight Club", "actors" : [ { "name" : "Brad Pitt" }, { "name" : "Edward Norton" } ] }
This is VERY wrong.
Let's switch the context, think about Movies, and CreditCards (for whatever reason, in this context credit cards would be stored in clear text inside the DB). This is SUPER WRONG?
The code would probably explode because it's trying to use an object
structure and receives another totally unknown structure.
Even worst, the code actually works and the webstore visitors
actually see credit cards information in the "Rent a movie" list.
Is there anything, built-in that would prevent such threat to ever happen? Like some way to "force" a schema to be respected for only some tables?
Or is there any way to force MongoDB to make a schema mandatory? (Can't create new fields in a table, etc)
EDIT: For those who thinks I'm trolling, I'm really not, this is an important question for me and my team because this is a big decision whether or not we're going to use NoSQL.
Thanks and have a nice day.
The schema-less aspect is one of the major positives.
A DB with a schema doesn't fully remove this kind of issue - e.g. there could be a bug in a system that uses a RDBMS that puts the wrong data in the wrong field/table.
IMHO, the bigger concern would be, how did that kind of bug make it through dev, testing and out into production?!
Having said that, you could set up a process that checks the "schema" of documents within a collection (e.g. look at newly added documents, check whether they have fields you would expect to see in there) - then flag up for investigation. There is such a tool (node.js) here (I think, I've never used it):
http://dhendo.github.com/node-mongodb-schema-validator/
Edit:
For those finding this question in future, so the link in my comment doesn't go overlooked, there's a jira item for this kind of thing here:
http://jira.mongodb.org/browse/SERVER-3536
Ok, so I'm trying to roll out a small update to my site. One update includes querying upon a field that may or may not exist. This doesn't work as I want, so I decided to just make it so that the field always exists in my database. I used this line at the MongoDB shell:
> db.entries.update({Published: null},{$set: {Published: true}},false,true);
Now, I'm not fully understanding how this caused every entry object where Published is null to be deleted. I mean, it literally was deleted. I tried looking up some IDs, and .findOne will return null for them.
How does that line work? I thought it would take every entry where Published is null(doesn't exist), and set Published to true.
Reading about operator behavior is better than guessing operator behavior. Search for null is different from performing a check for existence.
MongoDB has a dedicated $exists operator:
http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24exists
To be honest, I'm not sure why it now works with changes, or at least, why it deleted everything with that command.
My ending command looked like this:
db.entries.update({Published: {$exists: false},$atomic: true},{$set:{"Published":true}},false,true);
I thought it would take every entry where Published is null(doesn't exist), and set Published to true.
OK, so these are two different things.
Published is null:
{ Published : null, post : 'blah' }
Published does not exist:
{ post : 'blahblah' }
You may want to post this question over at the MongoDB user group (developers check it very often) at http://groups.google.com/group/mongodb-user
Updates do not delete documents. In fact, the update you ran does what you intended, for example, if you wanted y to always have a value:
> db.foo.insert({x:1})
> db.foo.insert({x:2})
> db.foo.insert({y:null})
> db.foo.insert({y:1})
> db.foo.update({y:null},{$set : {y:true}}, false, true)
> db.foo.find()
{ "_id" : ObjectId("4db02aabbe5a5418fb65d24c"), "y" : true }
{ "_id" : ObjectId("4db02aafbe5a5418fb65d24d"), "y" : 1 }
{ "_id" : ObjectId("4db02aa1be5a5418fb65d24a"), "x" : 1, "y" : true }
{ "_id" : ObjectId("4db02aa4be5a5418fb65d24b"), "x" : 2, "y" : true }
There must have been another operation that did the delete. There might be a record of it in the logs (or there might not... it depends how long it took). It's impossible to tell from the info here what caused the deletions, but the update isn't the culprit here.