Creating a task as a bug in Phabricator - phabricator

I am new to phabricator.
I am trying to create a bug on Phabricator for a project.
All I am seeing is create a task. No sub category of that task that whether it is a bug/backlogItem etc.
Thanks in Advance

In Phabricator you don't have bugs as separate thing. All are tasks. You can think that bug are task with high priority.
Although you can add a custom field to indicate if they are bug, improvements or what you want. If you want to know more about custom fields, so you can add a field "type", see https://secure.phabricator.com/book/phabricator/article/custom_fields/.

You can now set task type while creating a task

Adding custom fields can solve the problem. You can add bug as a custom field under type.
Also assign a key to the custom field
go to your
Maniphest Configuration
maniphest.custom-field-definitions
"key:hashtag": { "name": "Type", "type": "select", "options": { "key:task": "Task", "key:discussion": "Discussion", "key:bug": "Bug" },
this way you can also search all task, discussion or bugs in the search bar by just typing key:task or key:bug or key:discussion

You can tag your tickets as Bugs.
In Phabricator terminology Tags are the same as Projects. These "Project Tags" can be assigned to any Maniphest Tickets.
In your case you could simply create a new project named "Bug" and select the Bug icon and red color for it. Then you can assign this Tag to any Ticket.
The Tag will look like this then:

Related

Anonymous script firing with each pageload gtm.js and seems like a hack

I seem to be experiencing an issue where a random third party script keeps executing with each pageload on my site. I have a lot of pageview and event tracking in place and all of that is managed via GTM.
Script --
setTimeout(function(){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0017/9988.js?"+Math.floor((new Date).getTime()/36E5);a.async=!0;a.type="text/javascript";b.parentNode.insertBefore(a,b)},1);
The above third party script is injecting an empty document inside the header tag. The body and the header of the doc is completely empty.The query parameter in the injected doc keeps changing.
Has anyone else has experienced this issue in the past? Any ideas what this could be?
I also have a lot of customjs variables in GTM - I wanted to see if I could search for this piece of code in one of the custom js variables - anyone knows if there is an easy way to search through all variables without going into each one at a time?
Any help is greatly appreciated.
You can Export your container as JSON file:
In Google Tag Manager, navigate to the desired container.
In the top navigation, go to Admin and then Export Container.
Select the desired container version from the selector.
Preview and confirm your export file and click Download.
(link to source: https://support.google.com/tagmanager/answer/6106997?hl=en)
Once you donwlaod the JSON file open it in any text editor and search for the code, or simply search just for the specific domain in the tag e.g. "dnn506yrbagrg.cloudfront.net". The name name of the Tag or Variable will appear in the corresponding object.
For example you should see something like this (if the code is in html tag):
...
"tag": [
{
"accountId": "001",
"containerId": "123",
"tagId": "3",
"name": "THIS IS THE NAME OF YOUR TAG",
"type": "html",
"parameter": [
{
"type": "TEMPLATE",
"key": "html",
"value": "setTimeout(function(){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0017/9988.js?"+Math.floor((new Date).getTime()/36E5);a.async=!0;a.type="text/javascript";b.parentNode.insertBefore(a,b)},1);"
},
...
According to this documentation this seems to be the tracking code for Crazy Egg (heat maps and scroll maps) - the cloudfront URL matches. The parameter keeps changing because it's a random number generated by javascript to prevent caching.
This is obviously not part of GTM. Either you have configured this yourself in GTM or somewhere in your website, or you include a marketing tag (via custom HTML) that load Crazy Egg (which without a contract and a data processing agreement would be unethical and in many jurisdictions illegal).

Set Banana panel custom query

I have created a Banana custom panel, and I want to change dynamically its "custom query" by a system of "select" tag.
In this page, I can see that I can find a variable "_d" that contains custom. I can change it by a static variable which I give a value before launch Banana.                                                                            
Far in the tutorial, is a comment "Set the additional custom query", but, I am not sure of what I have to replace by my variable (or have I not to touch it?).
I decided to look at the filtering panel, because, in fact, it is what I want to do (filtering). But I don’t understand how does the module works (where does he stock its filters? and how does it apply them?).
I looked at the filterSrv.js, but I am not sure it do something on filtering/module.js (apart from giving function to filtering/module.js and filtering/module.html).
Do you know something about it?
To set the custom query, you have to set $scope.panel.queries.custom in module.js. This file src/app/partials/querySelect.html is responsible for the Queries tab in each panel's config, where you add custom queries through UI.

How to style form element in the angular-schema-form schema and not the form?

I am building a form using the awesome angular-schema-form. I am able to create my form schema object quite successfully. I am wanting (hoping) to be able to set all the form components in the schema using the x-schema-form property in the schema object.
I am able to specify the type and the titleMap's for selects all perfectly. However where I am having an issue is assigning a style to the element using the "x-schema-form" - it just seems to be being ignored.
So when I do the following (Note I have the Ionic Framework)
"x-schema-form": {
"type": "textarea",
"style": "item item-input"
}
The "style" is not getting passed to the form. If I pass the style in the $scope.form [] then I get the style. I am however trying to do this all in the schema as it would be much easier for me to do it in one place due to the nature in which I get the list of form elements.
Any advice on this would be greatly appreciated.
Thanks
BrentR
so asf doesn't actually support the style attribute at all, so what you're trying there is not possible at the moment. However you can use x-schema-form to apply a fieldHtmlClass and then via CSS apply styling.
You can read more on the standard options in the documentation. https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#standard-options

Can we replace the <add text> labels in SiteEdit 2012 (on Tridion 2011)?

Right now I've been implementing User Interface 2012 and after some hurdles it works just fine. I've been looking to optimise the usability of any UI-editable fields, and run into a related challenge.
Within a component there are several fields that are not mandatory, and as such should not be displayed when they are empty. As soon as an editor enters UI and selects the component holding said fields, several labels such as <add text> and <add internal link to component media> appear.
I am looking to change these labels to something more descriptive of their content, because additional html will be added to the page when a field is not empty.
For example (using Razor Mediator):
#if(Component.Fields.location != null) {
<span class="row">
<strong>Where:</strong>
<span>#RenderComponentField("location", 0)</span>
</span>
} else {
<tcdl:ComponentField name="location"></tcdl:ComponentField>
}
When the location field is empty, it just says <add text>. I would like to change that to <Add location to event>.
I've tried putting something between the tcdl-tags, but they display even when not editing in UI2012. I've been searching the SDL Live content sites but I cannot find any reference to it. Anyone have an idea?
There is no supported way for customizing placeholder text of the empty field. But you could try to write an extension, which overrides the following method:
Tridion.Web.UI.SiteEdit.ComponentField.prototype.setPlaceholderType
This method is responsible for setting up the placeholder text.
I was looking for the same when I was checking this, but I don't think that is doable easily AFAIK. I went little bit deep and found that the labels are part of resource file Tridion.Web.UI.Editors.SiteEdit.Strings.resx EmptyTextField. I did not pursue the option to fiddle with this because it would not be the supported way, nor documented and on top of it I still don't have the flexibility of adding my own text for the each field.
Back to your question, I was tossing up an idea (not necessarily answer to your question) and want to share here so the experts could provide some valuable suggestions. I did not try this option (i felt too much work) and this is in my long todo list and might have some drawbacks as well.
Create Schema Fields with "default values" (e.g; "Add location to event"). the default text will be displayed in your UI.
Write Your templates in a way that if the Schema field value is same as default
##if(Component.Fields.location.value == [Compare the schema field definition - default value of the field]) {
//--> Note: I could not find a straight API for this.. but I am assuming it should be there.
#RenderComponentField("location", 0)
} else {
<span class="row">
<strong>Where:</strong>
<span>#RenderComponentField("location", 0)</span>
</span>
}
Perform above condition check based on target type UI enabled, since we do not want to display the default text for live target etc.
Also, posting Tridion Idea as enhancement request will be great. I will do it in next few days if none exist already.
I like the approach as it'd be a quick way to give author's instructions at the field level. We use the description field to typically provide this type of help in the CME.
For inline editing, content types (SDL Live Content - login required) is another option since they define schema (and prototype component), template, instructions, and "save-to" context. You can offer dummy text that authors replace.
Tips:
Add sample content and/or instructions (Lorem Ipsum) in the prototype component.
Add additional instructions in the content type description.
Select storage location other than the prototype component's folder.
Let us know how it goes. :-)

Drupal views add form to add record

I have some view which lists my module table entries.
What is the most elegant way to attach a form below the view to add record?
Waht I am trying to do know is:
I created dedicated form in my module:
function my_module_form_add_record($form_state) {
form fields.....
}
I added to the view theme file:
$add_form = drupal_get_form('my_module_form_add_record');
print $add_form;
But I do not like this solution for at least 2 reasons:
I does not work ...
2. Even if it worked - it is depended on the theme file! So if I change the theme - functionality is crashed.
I would like to find more elegant solution to attach form from custom module to the view.
I know of the existence of the "Views Attach" module but it has no option of adding custom forms.
I know also of the existence of the Views Embedded form (and I am usig it) but it is only useful if you want to add form to the every row.
Seems the must be some solution to add record from the view page!
Thanks you for help.
you could use hook_views_pre_render:
This hook is called right before the render process. The query has been executed, and the pre_render() phase has already happened for handlers, so all data should be available.
Adding output to the view can be accomplished by placing text on $view->attachment_before and $view->attachment_after. Altering the content can be achieved by editing the items of $view->result.

Resources