How to set a template for a new issue in Redmine? - templates

The goal is to make users be more specific when reporting a bug.
Ususally I get a messy report "It doesn't work, please help ASAP!" from a user, so I keep asking the same questions each time -- "The why, the who-what-when, the where, and the how..."
Instead, I want to set a template for a new issue, something like this:
What page did you go? What login did you use?
What did you see?
What did you expect to see?
Why do you think this is a bug?
or whatever.
Is it possible?

This plugin would be very helpful, in your case,
Issue Templates- http://www.redmine.org/plugins/issue_templates

here is a patch for templating issue descriptions. anything beyond that is still underway, and is relevant to the issue mentioned above.
http://www.redmine.org/issues/2931

The link below says that you can for the last year or so:
http://www.redmine.org/issues/1138
But I haven't yet found a description of how this functionality is used. I guess I'll have to slog through some code to find out.

Maybe a possible workaround is to have an issue to use as a template.
Create an issue like this:
name: Bug template
description:
What page did you go?
What login did you use?
What did you see?
What did you expect to see?
Why do you think this is a bug?
Then you can duplicate it each time you need a real issue.
The limit is with issues with subtasks. If you duplicate the parent issue you don't get the subtasks duplicated as well.

Related

How can I fix the internal error in Django?

I don't have a lot of experience in Django and I am a fairly green developer. When I run the localhost I keep getting a Internal Error. I have tried most of the solutions to similar problems here and none of them works. Can anyone help me? The code is not mine so I don't want to alter it as such either.
Here is a picture of the errors I keep getting:
The only thing you can do without altering the code is to enter the value "shop_all_art" in the HomePage table in the database.
Do not share code via images. You should also share the related code.
Your stacktrace clearly says, that Python is not able to access first element of HomePage.objects.filter(value='shop_all_art') in file bidgala/bidgala/pages/views.py. all_art_img is most probably empty.
Looks like all_art_img is empty.
you should check if a Query has any elements before with a method such as
if all_art_img.exists():
all_art_img[0]

How to use merge tool "internal:fail" programmatically?

I am new in the Mercurial, and I am interested in the merging process. I would like to see how it happens programmatically, but something did not work out. I do not understand how to call the option, as we do it from the console using the hg merge --tool internal:fail command.
I did it like this
commands.merge(ui, repo, tool='internal:fail'),
but it still runs the default kdiff3.
I tried to do this
ui.setconfig('ui', 'merge', 'internal:fail')
commands.merge(ui, repo),
but it works like the previous one.
If someone understands what I'm doing wrong and how to fix it, please answer me.
Thank you for your attention to my question, have a good time =)
I managed to find the answer to my question, if someone needs it, look
We need to override the repository as follows:
def reposetup (ui, repo):
repo.ui.setconfig ('ui', 'merge', 'internal: fail') # or smth else, for example "merge3"
repo.ui.setconfig ('ui', 'interactive', 'no')
After this, the merge command will follow the configuration we defined =)

Where does the $BaseHref value come from in SilverStripe?

I can use {$BaseHref} in templates, but it is set to use the live website address when I'm using my dev copy of the site. I've done a flush=all. Where does it come from, so I can change it?
Edit: Sorry! I discovered I still had a hard-coded URL in my template. However, it sounds like the $BaseHref value became deprecated in SilverStripe 3.0. What should I be using instead?
Questions should be answered, although it already is in comments. This answer is for the statistic :-) It's generated dynamically but is deprecated. You should use $absoluteBaseURL and this is generated here:
https://github.com/silverstripe/silverstripe-framework/blob/3.1/control/Director.php#L768
https://github.com/silverstripe/silverstripe-framework/blob/3.1/control/Director.php#L554
https://github.com/silverstripe/silverstripe-framework/blob/3.1/core/Constants.php#L165

Mongoid 4 finding embedded documents by ID

I have a project that is my first serious dive into Mongoid.
I saw a tip to use the following command:
Parent.where('childrens._id' => Moped::BSON::ObjectId(params[:id])).first
But this doesn't work. Error message was:
NameError: uninitialized constant Moped::BSON
I found that BSON is no longer included, so I added it to my Gemfile, as well as Moped. Then, I did another fix I found (placing Moped::BSON=BSON in application.rb).
This still didn't work, but the error changed to:
NoMethodError: undefined method `ObjectId' for BSON:Module
So I am assuming that this method got deprecated or something. Does anyone have any other tips?
Just to be clear, I am finding myself in the situation where I want to sort embedded documents using jquery-sortable. This requires me to update them in the database, but the serialize from that doesn't include the parent document in the hash. So I figured I'd try to get it on the back end using an ID from the embedded document. That is why I need it.
Thanks again for any help you can provide.
Try simply:
Parent.where('childrens._id' => params[:id]).first
I have solved the question though this won't be of much help to people in the future. The requirements have changed and now I am using human-readable strings as IDs to assist in friendly URLs and some other stuff.
Therefore, I don't have any issues with ObjectIds. Cortex's solution should (from what I have read) work for dealing with ObjectIds but I cannot verify it now.

cakePHP, encoding problem when using find+list, no problem when using find+all

Well, I've configured the database.php file, added the 'encoding'=>'utf8' option.
also added the $this->charset('utf8') to my view.
Now, when I use the find('list') and echo its content I get those known question-marks. But, when I use the find('all) method, the data is delivered correctly.
And my questions are:
Why?
Who is to blame?
How to solve ?(I really prefer the list way..)
Should I drink more coffee?
can you try $this->find('all') and then use set to extract the values, like Set::extract('/Post/title', $posts); and print it out. if the find all was good and the set::extract is bad there could be a bug. If it works like normal then there is something weird as that is what the core does.